View | Details | Raw Unified | Return to bug 17431
Collapse All | Expand All

(-)a/t/db_dependent/api/v1/holds.t (-7 / +5 lines)
Lines 114-119 my $biblionumber2 = create_biblio('RESTful Web APIs'); Link Here
114
my $itemnumber2 = create_item($biblionumber2, 'TEST000002');
114
my $itemnumber2 = create_item($biblionumber2, 'TEST000002');
115
115
116
$dbh->do('DELETE FROM reserves');
116
$dbh->do('DELETE FROM reserves');
117
$dbh->do('DELETE FROM issuingrules');
118
    $dbh->do(q{
119
        INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed)
120
        VALUES (?, ?, ?, ?)
121
    }, {}, '*', '*', '*', 1);
117
122
118
my $reserve_id = C4::Reserves::AddReserve($branchcode, $borrowernumber,
123
my $reserve_id = C4::Reserves::AddReserve($branchcode, $borrowernumber,
119
    $biblionumber, undef, 1, undef, undef, undef, '', $itemnumber);
124
    $biblionumber, undef, 1, undef, undef, undef, '', $itemnumber);
Lines 263-274 subtest "Test endpoints with permission" => sub { Link Here
263
      ->status_is(200)
268
      ->status_is(200)
264
      ->json_is([]);
269
      ->json_is([]);
265
270
266
    $dbh->do('DELETE FROM issuingrules');
267
    $dbh->do(q{
268
        INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed)
269
        VALUES (?, ?, ?, ?)
270
    }, {}, '*', '*', '*', 1);
271
272
    $tx = $t->ua->build_tx(DELETE => "/api/v1/holds/$reserve_id2");
271
    $tx = $t->ua->build_tx(DELETE => "/api/v1/holds/$reserve_id2");
273
    $tx->req->cookies({name => 'CGISESSID', value => $session3->id});
272
    $tx->req->cookies({name => 'CGISESSID', value => $session3->id});
274
    $t->request_ok($tx)
273
    $t->request_ok($tx)
275
- 

Return to bug 17431