Bugzilla – Attachment 188826 Details for
Bug 41044
Fix argument isn't numeric in addition in Koha::Item::find_booking
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41044: Add a failing test
Bug-41044-Add-a-failing-test.patch (text/plain), 2.19 KB, created by
Paul Derscheid
on 2025-10-31 14:39:43 UTC
(
hide
)
Description:
Bug 41044: Add a failing test
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2025-10-31 14:39:43 UTC
Size:
2.19 KB
patch
obsolete
>From 0c690509f815cffc43bc38cefe230ae06e6055fe Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Fri, 17 Oct 2025 15:07:20 +0300 >Subject: [PATCH] Bug 41044: Add a failing test > >To test: >1. prove t/db_dependent/Koha/Item.t >2. Observe failing test > >Subtest: test empty string warning > 1..1 > not ok 1 - No warnings were produced > Failed test 'No warnings were produced' > at t/db_dependent/Koha/Item.t line 3656. > found warning: Argument "" isn't numeric in addition (+) at /usr/local/lib/x86_64-linux-gnu/perl/5.34.0/DateTime/Duration.pm line 70. > didn't expect to find a warning > Looks like you failed 1 test of 1. > not ok 9 - test empty string warning > Failed test 'test empty string warning' > at t/db_dependent/Koha/Item.t line 3657. > Looks like you failed 1 test of 9. >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> >--- > t/db_dependent/Koha/Item.t | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index 19cdb04deac..24859287702 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -3462,7 +3462,7 @@ subtest 'bookings' => sub { > }; > > subtest 'find_booking' => sub { >- plan tests => 8; >+ plan tests => 9; > > $schema->storage->txn_begin; > >@@ -3632,6 +3632,30 @@ subtest 'find_booking' => sub { > > }; > >+ subtest 'test empty string warning' => sub { >+ plan tests => 1; >+ >+ Koha::CirculationRules->set_rules( >+ { >+ branchcode => '*', >+ itemtype => $item->effective_itemtype, >+ rules => { >+ bookings_lead_period => '', >+ }, >+ } >+ ); >+ >+ warning_is { >+ $found_booking = $item->find_booking( >+ { >+ checkout_date => dt_from_string(), >+ due_date => dt_from_string()->add( days => 7 ), >+ } >+ ); >+ } >+ undef, "No warnings were produced"; >+ }; >+ > $schema->storage->txn_rollback; > }; > >-- >2.39.5
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 41044
:
188064
|
188065
|
188447
|
188448
| 188826 |
188827