Bugzilla – Attachment 193973 Details for
Bug 39729
Add option -exact_days to filter_by_last_update
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39729: Add tests
Bug-39729-Add-tests.patch (text/plain), 1.48 KB, created by
Baptiste Wojtkowski (bwoj)
on 2026-02-26 09:59:59 UTC
(
hide
)
Description:
Bug 39729: Add tests
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2026-02-26 09:59:59 UTC
Size:
1.48 KB
patch
obsolete
>From 38ec1787619e68f4a007f731cbaa799b5d214073 Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39729
:
181409
|
193972
|
193973
|
193974
|
193975