]> git.koha-community.org Git - koha.git/commit
Bug 36329: Make POST /transfer_limits/batch honor BranchTransferLimitsType
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 15 Mar 2024 12:56:22 +0000 (09:56 -0300)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Tue, 19 Mar 2024 09:25:01 +0000 (10:25 +0100)
commite846641eddb98d63f2fb9b78b7fe5fce00cd8569
tree0b57591f6fff240d9cd5cfb7e8eab82e0ce7f515
parent9760f066dd3488fe166015959aa8b526bb98daa6
Bug 36329: Make POST /transfer_limits/batch honor BranchTransferLimitsType

This patch adds tests for the different cases of `BranchTransferLimitsType`.
It also adds tests for the situation of the consumer sending both limit
criterias on the request.

The controller gets adjusted for this new behavior and the spec gets
documentation added about this.

Bonus: tests are added the right guidelines code, and
BranchTransferLimitsType gets mocked to avoid failures due to existing
data.

To test:
1. Apply this patches
2. Run:
   $ ktd --shell
  k$ qa
=> SUCCESS: All green, and tests pass!
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Fixed a typo in one of the return messages

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Koha/REST/V1/TransferLimits.pm
t/db_dependent/api/v1/transfer_limits.t