]> git.koha-community.org Git - koha.git/commit
Bug 25662: Make the route for holds restpect maxreserves
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 23 Jun 2020 13:33:14 +0000 (10:33 -0300)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 4 Sep 2020 20:10:31 +0000 (20:10 +0000)
commit3fac75b079299a49f90d0b958753f3c2c7e15b1f
tree48a9830322cf71f7b6ff3e734bada310409a782f
parent163d80a55d2f4f22954a7194ab3dbdc3a1460d31
Bug 25662: Make the route for holds restpect maxreserves

This patch fixes the behaviour for the POST /holds route. It assumed
maxreserves was checked in CanItemBeReserved which is not the case.

Tests are added to check for this behaviour.

To test:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 69bdc94cd4f420094c5706fb2bfc472ba24a5054)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/REST/V1/Holds.pm