From 8558ebbd4335ba6ff729a6cb4af88a6486097320 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Thu, 26 Feb 2026 09:59:00 +0000 Subject: [PATCH] Bug 39729: Add tests --- t/db_dependent/Koha/Objects.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t index 868577a027b..6cd0f96adc1 100755 --- a/t/db_dependent/Koha/Objects.t +++ b/t/db_dependent/Koha/Objects.t @@ -1254,7 +1254,7 @@ subtest "filter_by_last_update" => sub { class => 'Koha::Patrons', value => { updated_on => $now->clone->subtract( days => $i ) } } - )->borrowernumber; + )->borrowernumber; } my $patrons = Koha::Patrons->search( { borrowernumber => { -in => \@borrowernumbers } } ); @@ -1274,6 +1274,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)' ); -- 2.43.0