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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 120ef099fc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 17b379984b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
e93bb2958d
commit
99a51b428d
|
|
@ -3073,7 +3073,7 @@ subtest 'bookings' => sub {
|
|||
};
|
||||
|
||||
subtest 'find_booking' => sub {
|
||||
plan tests => 8;
|
||||
plan tests => 9;
|
||||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
|
|
@ -3243,6 +3243,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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue