|
Lines 28-33
use JSON;
Link Here
|
| 28 |
|
28 |
|
| 29 |
use C4::Circulation; |
29 |
use C4::Circulation; |
| 30 |
use C4::Biblio; |
30 |
use C4::Biblio; |
|
|
31 |
use C4::Auth qw(checkpw_hash); |
| 31 |
|
32 |
|
| 32 |
use Koha::Holds; |
33 |
use Koha::Holds; |
| 33 |
use Koha::Patrons; |
34 |
use Koha::Patrons; |
|
Lines 1502-1508
subtest '->store' => sub {
Link Here
|
| 1502 |
|
1503 |
|
| 1503 |
subtest '->set_password' => sub { |
1504 |
subtest '->set_password' => sub { |
| 1504 |
|
1505 |
|
| 1505 |
plan tests => 11; |
1506 |
plan tests => 12; |
| 1506 |
|
1507 |
|
| 1507 |
$schema->storage->txn_begin; |
1508 |
$schema->storage->txn_begin; |
| 1508 |
|
1509 |
|
|
Lines 1555-1560
subtest '->set_password' => sub {
Link Here
|
| 1555 |
$patron->discard_changes; |
1556 |
$patron->discard_changes; |
| 1556 |
|
1557 |
|
| 1557 |
isnt( $patron->password, $old_digest, 'Password has been updated' ); |
1558 |
isnt( $patron->password, $old_digest, 'Password has been updated' ); |
|
|
1559 |
ok( checkpw_hash('abcd a', $patron->password), 'Password hash is correct' ); |
| 1558 |
is( $patron->login_attempts, 0, 'Login attemps have been reset' ); |
1560 |
is( $patron->login_attempts, 0, 'Login attemps have been reset' ); |
| 1559 |
|
1561 |
|
| 1560 |
my $number_of_logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'CHANGE PASS', object => $patron->borrowernumber } )->count; |
1562 |
my $number_of_logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'CHANGE PASS', object => $patron->borrowernumber } )->count; |
| 1561 |
- |
|
|