|
Lines 1845-1851
subtest 'search_unsubscribed' => sub {
Link Here
|
| 1845 |
}; |
1845 |
}; |
| 1846 |
|
1846 |
|
| 1847 |
subtest 'search_anonymize_candidates' => sub { |
1847 |
subtest 'search_anonymize_candidates' => sub { |
| 1848 |
plan tests => 5; |
1848 |
plan tests => 7; |
| 1849 |
my $patron1 = $builder->build_object({ class => 'Koha::Patrons' }); |
1849 |
my $patron1 = $builder->build_object({ class => 'Koha::Patrons' }); |
| 1850 |
my $patron2 = $builder->build_object({ class => 'Koha::Patrons' }); |
1850 |
my $patron2 = $builder->build_object({ class => 'Koha::Patrons' }); |
| 1851 |
$patron1->anonymized(0); |
1851 |
$patron1->anonymized(0); |
|
Lines 1887-1892
subtest 'search_anonymize_candidates' => sub {
Link Here
|
| 1887 |
$patron1->login_attempts(3)->store; |
1887 |
$patron1->login_attempts(3)->store; |
| 1888 |
is( Koha::Patrons->search_anonymize_candidates({locked => 1})->count, |
1888 |
is( Koha::Patrons->search_anonymize_candidates({locked => 1})->count, |
| 1889 |
$cnt+1, 'Locked flag' ); |
1889 |
$cnt+1, 'Locked flag' ); |
|
|
1890 |
|
| 1891 |
t::lib::Mocks::mock_preference( 'FailedLoginAttempts', q{} ); |
| 1892 |
# Patron 1 still on 3 == locked |
| 1893 |
is( Koha::Patrons->search_anonymize_candidates({locked => 1})->count, |
| 1894 |
$cnt+1, 'Still expect same number for FailedLoginAttempts empty' ); |
| 1895 |
$patron1->login_attempts(0)->store; |
| 1896 |
# Patron 1 unlocked |
| 1897 |
is( Koha::Patrons->search_anonymize_candidates({locked => 1})->count, |
| 1898 |
$cnt, 'Patron 1 unlocked' ); |
| 1890 |
}; |
1899 |
}; |
| 1891 |
|
1900 |
|
| 1892 |
subtest 'search_anonymized' => sub { |
1901 |
subtest 'search_anonymized' => sub { |
| 1893 |
- |
|
|