From f78eb61cc7ec16d4d2bbf64abde4d24b1ac2f6e3 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 17 Jul 2017 16:21:56 -0300 Subject: [PATCH] Bug 18936: Fix api/v1/holds.t --- t/db_dependent/api/v1/holds.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t index df372c7f9f..1dce19de95 100644 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -137,14 +137,15 @@ my $itemnumber2 = $item2->{itemnumber}; my $dbh = C4::Context->dbh; $dbh->do('DELETE FROM reserves'); -$dbh->do('DELETE FROM circulation_rules'); +Koha::CirculationRules->search()->delete(); Koha::CirculationRules->set_rules( { categorycode => '*', branchcode => '*', itemtype => '*', rules => { - reservesallowed => 1 + reservesallowed => 1, + holds_per_record => 99 } } ); @@ -208,6 +209,7 @@ subtest "Test endpoints without permission" => sub { $t->request_ok($tx) # no permission ->status_is(403); }; + subtest "Test endpoints without permission, but accessing own object" => sub { plan tests => 15; -- 2.15.1