From 0575bc22d14b7a14ba38df51432114f53230bd2f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 5 May 2020 10:49:07 +0100 Subject: [PATCH] Bug 18308: (RM follow-up) Fix failing tests Signed-off-by: Martin Renvoize --- t/db_dependent/Koha/Patrons/Import.t | 6 +++--- t/db_dependent/Koha/Plugins/Patron.t | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Koha/Patrons/Import.t b/t/db_dependent/Koha/Patrons/Import.t index dee815a80e..a6f09e41ab 100644 --- a/t/db_dependent/Koha/Patrons/Import.t +++ b/t/db_dependent/Koha/Patrons/Import.t @@ -446,11 +446,11 @@ subtest 'test_import_with_password_overwrite' => sub { my $categorycode = $builder->build({ source => "Category", value => { category_type => 'A' } })->{categorycode}; my $staff_categorycode = $builder->build({ source => "Category", value => { category_type => 'S' } })->{categorycode}; my $csv_headers = 'surname,userid,branchcode,categorycode,password'; - my $csv_password = "Worrell,ErnestP,$branchcode,$categorycode,Ernest1"; - my $csv_password_change = "Worrell,ErnestP,$branchcode,$categorycode,Vern1"; + my $csv_password = "Worrell,ErnestP,$branchcode,$categorycode,Ernest11"; + my $csv_password_change = "Worrell,ErnestP,$branchcode,$categorycode,Vern1234"; my $csv_blank_password = "Worel,ErnestP,$branchcode,$categorycode,"; my $defaults = { cardnumber => "" }; #currently all the defaults come as "" if not filled - my $csv_staff_password_change = "Worrell,ErnestP,$branchcode,$staff_categorycode,Vern1"; + my $csv_staff_password_change = "Worrell,ErnestP,$branchcode,$staff_categorycode,Vern1234"; #Make the test files for importing my $filename_1 = make_csv($temp_dir, $csv_headers, $csv_password); diff --git a/t/db_dependent/Koha/Plugins/Patron.t b/t/db_dependent/Koha/Plugins/Patron.t index 22bf9b2210..319928d968 100644 --- a/t/db_dependent/Koha/Plugins/Patron.t +++ b/t/db_dependent/Koha/Plugins/Patron.t @@ -73,6 +73,7 @@ subtest 'check_password hook tests' => sub { ok( $patron->store, 'Patron created with good password' ); t::lib::Mocks::mock_preference( 'RequireStrongPassword', '0' ); + t::lib::Mocks::mock_preference( 'minPasswordLength', '3' ); throws_ok { $patron->set_password({ password => 'explosion' }) } 'Koha::Exceptions::Password::Plugin', 'Exception raised for update patron password with bad string'; ok( $patron->set_password({ password => '4321' }), 'Patron password updated with good string' ); -- 2.39.5