@@ -, +, @@ --- t/db_dependent/Circulation.t | 28 +++++++++++++++++----------- t/db_dependent/Circulation/GetHardDueDate.t | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) --- a/t/db_dependent/Circulation.t +++ a/t/db_dependent/Circulation.t @@ -2955,17 +2955,23 @@ subtest 'ItemsDeniedRenewal preference' => sub { C4::Context->set_preference('ItemsDeniedRenewal',''); my $idr_lib = $builder->build_object({ class => 'Koha::Libraries'}); - $dbh->do( - q{ - INSERT INTO issuingrules ( categorycode, branchcode, itemtype, reservesallowed, issuelength, lengthunit, renewalsallowed, renewalperiod, - norenewalbefore, auto_renew, fine, chargeperiod ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) - }, - {}, - '*', $idr_lib->branchcode, '*', 25, - 14, 'days', - 10, 7, - undef, 0, - .10, 1 + Koha::CirculationRules->set_rules( + { + categorycode => '*', + itemtype => '*', + branchcode => $idr_lib->branchcode, + rules => { + reservesallowed => 25, + issuelength => 14, + lengthunit => 'days', + renewalsallowed => 10, + renewalperiod => 7, + norenewalbefore => undef, + auto_renew => 0, + fine => .10, + chargeperiod => 1, + } + } ); my $deny_book = $builder->build_object({ class => 'Koha::Items', value => { --- a/t/db_dependent/Circulation/GetHardDueDate.t +++ a/t/db_dependent/Circulation/GetHardDueDate.t @@ -10,7 +10,7 @@ use Koha::Library; use t::lib::TestBuilder; -use Test::More tests => 10; +use Test::More tests => 9; BEGIN { use_ok('C4::Circulation'); --