From 71182615dfc919b8869a95baf4e70d810a0a2c27 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 13 Jun 2019 11:28:40 -0500 Subject: [PATCH] Bug 23104: Add tests for maxonsiteissueqty --- t/db_dependent/Circulation/TooMany.t | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Circulation/TooMany.t b/t/db_dependent/Circulation/TooMany.t index 577a0dada9..a5ad9263a7 100644 --- a/t/db_dependent/Circulation/TooMany.t +++ b/t/db_dependent/Circulation/TooMany.t @@ -661,7 +661,7 @@ subtest 'General vs specific rules limit quantity correctly' => sub { }; subtest 'empty string means unlimited' => sub { - plan tests => 1; + plan tests => 2; Koha::CirculationRules->set_rules( { @@ -670,7 +670,7 @@ subtest 'empty string means unlimited' => sub { itemtype => '*', rules => { maxissueqty => '', - maxonsiteissueqty => 0, + maxonsiteissueqty => '', } }, ); @@ -680,6 +680,12 @@ subtest 'empty string means unlimited' => sub { 'maxissueqty="" should mean unlimited' ); + is( + C4::Circulation::TooMany( $patron, $biblio->{biblionumber}, $item, { onsite_checkout => 1 } ), + undef, + 'maxonsiteissueqty="" should mean unlimited' + ); + teardown(); }; -- 2.11.0