Bug 39729: Add tests

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Baptiste Wojtkowski 2026-02-26 09:59:00 +00:00 committed by Pedro Amorim
parent 2d73f3eb42
commit 501d4c5769
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 3 additions and 0 deletions

View File

@ -1275,6 +1275,9 @@ subtest "filter_by_last_update" => sub {
my $count = $patrons->filter_by_last_update( { timestamp_column_name => 'updated_on', days => 2 } )->count;
is( $count, 3, '3 patrons have been updated before the last 2 days (exclusive)' );
$count = $patrons->filter_by_last_update( { timestamp_column_name => 'updated_on', exact_days => 2 } )->count;
is( $count, 1, '1 patron has been updated 2 days ago' );
$count = $patrons->filter_by_last_update( { timestamp_column_name => 'updated_on', min_days => 2 } )->count;
is( $count, 4, '4 patrons have been updated before the last 2 days (inclusive)' );