Lines 1798-1813
subtest '->set_password' => sub {
Link Here
|
1798 |
}; |
1798 |
}; |
1799 |
|
1799 |
|
1800 |
$schema->storage->txn_begin; |
1800 |
$schema->storage->txn_begin; |
1801 |
subtest 'filter_by_dateexpiry' => sub { |
1801 |
subtest 'filter_by_expiration_date' => sub { |
1802 |
plan tests => 3; |
1802 |
plan tests => 3; |
1803 |
my $count1 = Koha::Patrons->filter_by_dateexpiry({ days => 28 })->count; |
1803 |
my $count1 = Koha::Patrons->filter_by_expiration_date({ days => 28 })->count; |
1804 |
my $patron1 = $builder->build_object({ class => 'Koha::Patrons' }); |
1804 |
my $patron1 = $builder->build_object({ class => 'Koha::Patrons' }); |
1805 |
$patron1->dateexpiry( dt_from_string->subtract(days => 27) )->store; |
1805 |
$patron1->dateexpiry( dt_from_string->subtract(days => 27) )->store; |
1806 |
is( Koha::Patrons->filter_by_dateexpiry({ days => 28 })->count, $count1, 'No more expired' ); |
1806 |
is( Koha::Patrons->filter_by_expiration_date({ days => 28 })->count, $count1, 'No more expired' ); |
1807 |
$patron1->dateexpiry( dt_from_string->subtract(days => 28) )->store; |
1807 |
$patron1->dateexpiry( dt_from_string->subtract(days => 28) )->store; |
1808 |
is( Koha::Patrons->filter_by_dateexpiry({ days => 28 })->count, $count1 + 1, 'One more expired' ); |
1808 |
is( Koha::Patrons->filter_by_expiration_date({ days => 28 })->count, $count1 + 1, 'One more expired' ); |
1809 |
$patron1->dateexpiry( dt_from_string->subtract(days => 29) )->store; |
1809 |
$patron1->dateexpiry( dt_from_string->subtract(days => 29) )->store; |
1810 |
is( Koha::Patrons->filter_by_dateexpiry({ days => 28 })->count, $count1 + 1, 'Same number again' ); |
1810 |
is( Koha::Patrons->filter_by_expiration_date({ days => 28 })->count, $count1 + 1, 'Same number again' ); |
1811 |
}; |
1811 |
}; |
1812 |
|
1812 |
|
1813 |
subtest 'search_unsubscribed' => sub { |
1813 |
subtest 'search_unsubscribed' => sub { |
1814 |
- |
|
|