From e64a89cd596e20237a1cfc7d3d701dc160b83478 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Feb 2019 17:04:38 -0300 Subject: [PATCH] Bug 18925: Update new occurrences --- t/db_dependent/Circulation/TooMany.t | 21 ++++++++++++--------- t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t | 3 +-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/t/db_dependent/Circulation/TooMany.t b/t/db_dependent/Circulation/TooMany.t index 581a010e18..47263a9865 100644 --- a/t/db_dependent/Circulation/TooMany.t +++ b/t/db_dependent/Circulation/TooMany.t @@ -163,16 +163,19 @@ subtest '1 Issuingrule exist 0 0: no issue allowed' => sub { subtest '1 Issuingrule exist with onsiteissueqty=unlimited' => sub { plan tests => 4; - my $issuingrule = $builder->build({ - source => 'Issuingrule', - value => { - branchcode => $branch->{branchcode}, - categorycode => $category->{categorycode}, - itemtype => '*', - maxissueqty => 1, - maxonsiteissueqty => undef, + + Koha::CirculationRules->set_rules( + { + branchcode => $branch->{branchcode}, + categorycode => $category->{categorycode}, + itemtype => '*', + rules => { + maxissueqty => 1, + maxonsiteissueqty => undef, + } }, - }); + ); + my $issue = C4::Circulation::AddIssue( $patron, $item->{barcode}, dt_from_string() ); t::lib::Mocks::mock_preference('ConsiderOnSiteCheckoutsAsNormalCheckouts', 0); is_deeply( diff --git a/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t b/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t index 686053f1c8..0b5f2426b7 100755 --- a/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t +++ b/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t @@ -126,7 +126,7 @@ AddReturn( $item1->{barcode} ); my $hold_allowed_from_home_library = 1; my $hold_allowed_from_any_libraries = 2; my $sth_delete_rules = $dbh->prepare(q|DELETE FROM default_circ_rules|); - my $sth_insert_rule = $dbh->prepare(q|INSERT INTO default_circ_rules(singleton, maxissueqty, maxonsiteissueqty, holdallowed, hold_fulfillment_policy, returnbranch) VALUES ('singleton', NULL, NULL, ?, 'any', 'homebranch');|); + my $sth_insert_rule = $dbh->prepare(q|INSERT INTO default_circ_rules(singleton, holdallowed, hold_fulfillment_policy, returnbranch) VALUES ('singleton', ?, 'any', 'homebranch');|); subtest 'Item is available at a different library' => sub { plan tests => 4; @@ -240,7 +240,6 @@ $rule = Koha::IssuingRule->new( categorycode => '*', itemtype => '*', branchcode => '*', - maxissueqty => 99, issuelength => 7, lengthunit => 8, reservesallowed => 99, -- 2.11.0