Bug 18936: (follow-up) Add missing circulation rule to fix tests

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 <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Joonas Kylmälä 2020-01-22 19:03:03 +02:00 committed by Martin Renvoize
parent 25848e5af3
commit 47781d91df
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 10 additions and 0 deletions

View File

@ -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,