]> 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)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 13 May 2024 14:40:58 +0000 (14:40 +0000)
commit900f6b2ce078affd3b3c3457c486fa9bcd2d8439
tree2b0702df47f6efb51d1a43b4a28f93c78d418f01
parentde5e919d387816593c7be5b16956f0e6cad558ce
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>
(cherry picked from commit e846641eddb98d63f2fb9b78b7fe5fce00cd8569)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f39baa0b9814a7a90c1819291284fcbe4027b2c5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/REST/V1/TransferLimits.pm
t/db_dependent/api/v1/transfer_limits.t