@@ -, +, @@ --- t/db_dependent/api/v1/holds.t | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) --- a/t/db_dependent/api/v1/holds.t +++ a/t/db_dependent/api/v1/holds.t @@ -114,6 +114,11 @@ my $biblionumber2 = create_biblio('RESTful Web APIs'); my $itemnumber2 = create_item($biblionumber2, 'TEST000002'); $dbh->do('DELETE FROM reserves'); +$dbh->do('DELETE FROM issuingrules'); + $dbh->do(q{ + INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed) + VALUES (?, ?, ?, ?) + }, {}, '*', '*', '*', 1); my $reserve_id = C4::Reserves::AddReserve($branchcode, $borrowernumber, $biblionumber, undef, 1, undef, undef, undef, '', $itemnumber); @@ -263,12 +268,6 @@ subtest "Test endpoints with permission" => sub { ->status_is(200) ->json_is([]); - $dbh->do('DELETE FROM issuingrules'); - $dbh->do(q{ - INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed) - VALUES (?, ?, ?, ?) - }, {}, '*', '*', '*', 1); - $tx = $t->ua->build_tx(DELETE => "/api/v1/holds/$reserve_id2"); $tx->req->cookies({name => 'CGISESSID', value => $session3->id}); $t->request_ok($tx) --