https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43844

--- Comment #3 from Arthur Suzuki <[email protected]> ---
Created attachment 208417
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208417&action=edit
Bug 43844: Fix test data: holds used with set_waiting need a non-loan item

The new Koha::Hold::set_waiting guard throws when the hold's item is
on loan. The generic test builder fills items.onloan with a random
datetime for FK-auto-created items, so holds built with
build_object({ class => 'Koha::Holds' }) looked on loan and the
set_waiting calls in these subtests started throwing.

Give those holds a real available item (build_sample_item) instead.
In Holds_hooks.t the item creation hooks are mocked out following the
pattern already used by the other subtests in the file, to keep the
'no warnings' test happy.

No behavior change; these subtests only exercise waitingdate,
expirationdate, suspend and plugin hook logic.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to