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

(-)a/t/db_dependent/Koha/Item.t (-2 / +3 lines)
Lines 360-367 subtest 'has_pending_hold() tests' => sub { Link Here
360
    my $dbh = C4::Context->dbh;
360
    my $dbh = C4::Context->dbh;
361
    my $item  = $builder->build_sample_item({ itemlost => 0 });
361
    my $item  = $builder->build_sample_item({ itemlost => 0 });
362
    my $itemnumber = $item->itemnumber;
362
    my $itemnumber = $item->itemnumber;
363
    my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
364
    my $borrowernumber = $patron->id;
363
365
364
    $dbh->do("INSERT INTO tmp_holdsqueue (surname,borrowernumber,itemnumber) VALUES ('Clamp',42,$itemnumber)");
366
    $dbh->do("INSERT INTO tmp_holdsqueue (surname,borrowernumber,itemnumber) VALUES ('Clamp',$borrowernumber,$itemnumber)");
365
    ok( $item->has_pending_hold, "Yes, we have a pending hold");
367
    ok( $item->has_pending_hold, "Yes, we have a pending hold");
366
    $dbh->do("DELETE FROM tmp_holdsqueue WHERE itemnumber=$itemnumber");
368
    $dbh->do("DELETE FROM tmp_holdsqueue WHERE itemnumber=$itemnumber");
367
    $item->discard_changes;
369
    $item->discard_changes;
368
- 

Return to bug 34918