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

--- Comment #46 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 209579
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209579&action=edit
Bug 42383: (QA follow-up) Add tests for forgive_hold_fees on hold_cancellation

This patch adds tests for POST /checkins/{checkin_id}/hold_cancellation
with forgive_hold_fees. They highlight that the endpoint rejects the
parameter: the request body schema does not allow it, so the request
fails with a 400 and the hold is never cancelled.

The tests cover:
- 403 (no_permission_for_forgive_hold_fees) without updatecharges.writeoff
- No ExpireReservesMaxPickUpDelayCharge fee when the fees are forgiven
- The fee being charged when they are not

Test plan:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/checkins.t
=> FAIL: Tests fail! The forgive_hold_fees requests return 400
3. Sign off :-D

Assisted-by: Opus 5.5 (Anthropic)
Signed-off-by: Brendan Lawlor <[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/

Reply via email to