Bugzilla – Attachment 161040 Details for
Bug 35788
Remove Koha::Template::Plugin::Biblio::BookingsCount
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35788: Test for current day booking
Bug-35788-Test-for-current-day-booking.patch (text/plain), 1.49 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-01-15 13:47:58 UTC
(
hide
)
Description:
Bug 35788: Test for current day booking
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-01-15 13:47:58 UTC
Size:
1.49 KB
patch
obsolete
>From 88dad6456f1e7ba07c6988b8ec49836489628cd8 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 15 Jan 2024 10:35:04 -0300 >Subject: [PATCH] Bug 35788: Test for current day booking > >The implemented tests checked past and future dates for filtering >bookings. But `> NOW()` excludes the current date, and this case was not >covered. It is now. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Koha/Bookings.t | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Bookings.t b/t/db_dependent/Koha/Bookings.t >index 19e2e8e37c8..ca409a6123c 100755 >--- a/t/db_dependent/Koha/Bookings.t >+++ b/t/db_dependent/Koha/Bookings.t >@@ -33,7 +33,7 @@ my $builder = t::lib::TestBuilder->new; > > subtest 'filter_by_future' => sub { > >- plan tests => 1; >+ plan tests => 2; > > $schema->storage->txn_begin; > >@@ -75,5 +75,18 @@ subtest 'filter_by_future' => sub { > > is( $biblio->bookings->filter_by_future->count, 2, 'There should have 2 bookings starting after now' ); > >+ $builder->build_object( >+ { >+ class => 'Koha::Bookings', >+ value => { >+ biblio_id => $biblio->biblionumber, >+ start_date => dt_from_string->truncate( to => 'day' ), >+ end_date => undef >+ } >+ } >+ ); >+ >+ is( $biblio->bookings->filter_by_future->count, 2, 'Current day is not considered future' ); >+ > $schema->storage->txn_rollback; > }; >-- >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 35788
:
160961
|
161039
| 161040 |
161041