From 3971aa724f6753c9316c7bb18629d0080a882eba 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 9c9ce94..cad092b 100644 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -121,14 +121,15 @@ my $itemnumber2 = create_item($biblionumber2, 'TEST000002'); 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 } } ); @@ -192,6 +193,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.10.2