]> 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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 21 Mar 2024 10:07:57 +0000 (11:07 +0100)
commitf39baa0b9814a7a90c1819291284fcbe4027b2c5
treef6787cefcf858ff99bdf734043f9484f30bad287
parentbdeabccf3d1e9dd2edd05c4a5f82cb801382e4a6
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>
Koha/REST/V1/TransferLimits.pm
t/db_dependent/api/v1/transfer_limits.t