Browse Source

Bug 32878: (QA follow-up) Correct unit test

After the patch we fail on renewing a not for loan item with an item
level hold.

I don't find justification for why this should be renewable, so I just
change the test expectation

This needs another QA eye

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23.05.x
Nick Clemens 1 year ago
committed by Tomas Cohen Arazi
parent
commit
12939c7583
Signed by: tomascohen GPG Key ID: 0A272EA1B2F3C15F
  1. 2
      t/db_dependent/Circulation.t

2
t/db_dependent/Circulation.t

@ -672,7 +672,7 @@ subtest "CanBookBeRenewed tests" => sub {
# Items can't fill hold for reasons
$item_1->notforloan(1)->store;
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $item_1->itemnumber, 1);
is( $renewokay, 1, 'Can renew, item is marked not for loan, hold does not block');
is( $renewokay, 0, 'Cannot renew, item is marked not for loan, but an item specific hold always blocks');
$item_1->set({notforloan => 0, itype => $itemtype })->store;
# FIXME: Add more for itemtype not for loan etc.

Loading…
Cancel
Save