https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43071
--- Comment #2 from David Nind <[email protected]> --- Created attachment 202380 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202380&action=edit Bug 43071: Isolate holds_per_day-sensitive tests from ambient circulation rules t/db_dependent/Holds.t, t/db_dependent/ILSDI_Services.t, and t/db_dependent/api/v1/holds.t all fail if a site has a global 'Holds Allowed (Daily)' circulation rule configured, because C4::Reserves::CanItemBeReserved checks holds_per_day before holds_per_record/reservesallowed, so an ambient daily-cap rule returns tooManyReservesToday and masks the status these tests actually exercise (tooManyReserves, noReservesAllowed, OK, or the API's hold_limit override). The affected subtests never set holds_per_day themselves, so they unintentionally depend on the database having no such rule configured. Test plan: 1. On a fresh db, set a global 'Holds Allowed (Daily)' circulation rule (Administration > Circulation and fine rules) to 1. 2. prove t/db_dependent/Holds.t t/db_dependent/ILSDI_Services.t t/db_dependent/api/v1/holds.t => fails before this patch, passes after. 3. Remove the circulation rule and re-run the same tests. => still passes (no regression for the default/unconfigured case). Signed-off-by: David Nind <[email protected]> -- 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/
