Lines 1837-1843
subtest 'search_unsubscribed' => sub {
Link Here
|
1837 |
}; |
1837 |
}; |
1838 |
|
1838 |
|
1839 |
subtest 'search_anonymize_candidates' => sub { |
1839 |
subtest 'search_anonymize_candidates' => sub { |
1840 |
plan tests => 5; |
1840 |
plan tests => 7; |
1841 |
my $patron1 = $builder->build_object({ class => 'Koha::Patrons' }); |
1841 |
my $patron1 = $builder->build_object({ class => 'Koha::Patrons' }); |
1842 |
my $patron2 = $builder->build_object({ class => 'Koha::Patrons' }); |
1842 |
my $patron2 = $builder->build_object({ class => 'Koha::Patrons' }); |
1843 |
$patron1->anonymized(0); |
1843 |
$patron1->anonymized(0); |
Lines 1879-1884
subtest 'search_anonymize_candidates' => sub {
Link Here
|
1879 |
$patron1->login_attempts(3)->store; |
1879 |
$patron1->login_attempts(3)->store; |
1880 |
is( Koha::Patrons->search_anonymize_candidates({locked => 1})->count, |
1880 |
is( Koha::Patrons->search_anonymize_candidates({locked => 1})->count, |
1881 |
$cnt+1, 'Locked flag' ); |
1881 |
$cnt+1, 'Locked flag' ); |
|
|
1882 |
|
1883 |
t::lib::Mocks::mock_preference( 'FailedLoginAttempts', q{} ); |
1884 |
# Patron 1 still on 3 == locked |
1885 |
is( Koha::Patrons->search_anonymize_candidates({locked => 1})->count, |
1886 |
$cnt+1, 'Still expect same number for FailedLoginAttempts empty' ); |
1887 |
$patron1->login_attempts(0)->store; |
1888 |
# Patron 1 unlocked |
1889 |
is( Koha::Patrons->search_anonymize_candidates({locked => 1})->count, |
1890 |
$cnt, 'Patron 1 unlocked' ); |
1882 |
}; |
1891 |
}; |
1883 |
|
1892 |
|
1884 |
subtest 'search_anonymized' => sub { |
1893 |
subtest 'search_anonymized' => sub { |
1885 |
- |
|
|