Lines 524-534
subtest 'Check value of login_attempts in checkpw' => sub {
Link Here
|
524 |
my $patron = $builder->build_object({ class => 'Koha::Patrons' }); |
524 |
my $patron = $builder->build_object({ class => 'Koha::Patrons' }); |
525 |
$patron->set_password({ password => '123', skip_validation => 1 }); |
525 |
$patron->set_password({ password => '123', skip_validation => 1 }); |
526 |
|
526 |
|
527 |
my @test = checkpw( $dbh, $patron->userid, '123', undef, 'opac', 1 ); |
527 |
my @test = checkpw( $patron->userid, '123', undef, 'opac', 1 ); |
528 |
is( $test[0], 1, 'Patron authenticated correctly' ); |
528 |
is( $test[0], 1, 'Patron authenticated correctly' ); |
529 |
|
529 |
|
530 |
$patron->password_expiration_date('2020-01-01')->store; |
530 |
$patron->password_expiration_date('2020-01-01')->store; |
531 |
@test = checkpw( $dbh, $patron->userid, '123', undef, 'opac', 1 ); |
531 |
@test = checkpw( $patron->userid, '123', undef, 'opac', 1 ); |
532 |
is( $test[0], -2, 'Patron returned as expired correctly' ); |
532 |
is( $test[0], -2, 'Patron returned as expired correctly' ); |
533 |
|
533 |
|
534 |
}; |
534 |
}; |
535 |
- |
|
|