Bug 18308: fix failing tests
# Failed test 'check_password hook tests' # at t/db_dependent/Koha/Plugins/Patron.t line 83. [The password was rejected by a plugin]# Looks like your test exited with 255 just after 5. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
0575bc22d1
commit
cd141a7445
|
|
@ -69,7 +69,7 @@ subtest 'check_password hook tests' => sub {
|
|||
|
||||
throws_ok { $patron->store } 'Koha::Exceptions::Password::Plugin',
|
||||
'Exception raised for adding patron with bad password';
|
||||
$patron->password('1234');
|
||||
$patron->password('12345678');
|
||||
ok( $patron->store, 'Patron created with good password' );
|
||||
|
||||
t::lib::Mocks::mock_preference( 'RequireStrongPassword', '0' );
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ sub check_password {
|
|||
my ( $self, $args ) = @_;
|
||||
|
||||
my $password = $args->{'password'};
|
||||
if ( $password && $password =~ m/^\d\d\d\d$/ ) {
|
||||
if ( $password && $password =~ m/^\d{8}$/ ) {
|
||||
return { error => 0 };
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue