From bddf9066bbcac50a2656d281da73f93d8e2af0ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Wed, 22 Jan 2020 19:03:03 +0200 Subject: [PATCH] Bug 18936: (follow-up) Add missing circulation rule to fix tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests passed before by a chance because the default kohadevbox installation script added a issuing rule that had lengthunit = days. If you use a Koha version before the commits introduced by Bug 18936 you can reproduce the Fees.t tests failing by deleting all the issuing rules from database with > delete issuingrules; and then running $ prove t/db_dependent/Koha/Charges/Fees.t Signed-off-by: Minna Kivinen Signed-off-by: Joonas Kylmälä --- t/db_dependent/Koha/Charges/Fees.t | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/t/db_dependent/Koha/Charges/Fees.t b/t/db_dependent/Koha/Charges/Fees.t index 431e292a54..e015927074 100644 --- a/t/db_dependent/Koha/Charges/Fees.t +++ b/t/db_dependent/Koha/Charges/Fees.t @@ -320,6 +320,16 @@ subtest 'accumulate_rentalcharge tests' => sub { ); # Daily tests + Koha::CirculationRules->set_rules({ + categorycode => $patron->categorycode, + itemtype => $itemtype->id, + branchcode => $library->id, + rules => { + lengthunit => 'days', + } + } + ); + $itemtype->rentalcharge_daily(1.00); $itemtype->store(); is( $itemtype->rentalcharge_daily, -- 2.11.0