From 9d11d98d07c6945caf3f47af64efbbd2cc5b7a94 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 74b6a1b266..5c4b9d5c5b 100644 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -131,14 +131,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 } } ); @@ -202,6 +203,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