]> git.koha-community.org Git - koha.git/commit
Bug 27209: (follow-up) Add ->is_pickup_location_valid
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 14 Dec 2020 10:37:53 +0000 (07:37 -0300)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Mon, 28 Dec 2020 14:56:57 +0000 (14:56 +0000)
commit83ffb4ae67e54196c4dca56dad2f4bd658642d1a
treef5472a95b3e11a2a2603953f4b4b71ccbee50704
parentae79128f76087503e9f22cafec2cec6c2b9616c7
Bug 27209: (follow-up) Add ->is_pickup_location_valid

This patch simply refactors the pickup location check into a method that
can be called on its own. Tests are added, and the tests for
->set_pickup_location should pass unmodified.

To test:
1. Apply the first two patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Hold.t
=> SUCCESS: tests pass
3. Apply this refactoring patch
4. Notice the tests are similar, but check for boolean output
5. Repeat 2
=> SUCCESS: New tests pass, set_pickup_location() behavior unchanged.
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 865a1dab5c346920c61237c4b7593202328e04f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 02df63c430df50d0d6985be23c4e5a98142b8a30)
Koha/Hold.pm
t/db_dependent/Koha/Hold.t