]> git.koha-community.org Git - koha.git/commit
Bug 27064: Correct transferbook.t tests to reflect new behaviour of transferbook()
authorJoonas Kylmälä <joonas.kylmala@helsinki.fi>
Tue, 15 Jun 2021 08:56:43 +0000 (11:56 +0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 18 Jun 2021 11:12:02 +0000 (07:12 -0400)
commitdba0cc7cc2606e88f22b50d0a75ef37e382388ec
tree57f075304b773fa7824cf0ada1de486bf92bfdbb
parent30fac5c75a2f901f6b93266bf8836489c1fcbc84
Bug 27064: Correct transferbook.t tests to reflect new behaviour of transferbook()

The transferbook() behaviour was changed so that it only allows
transferring the item with a reserve if ignore_reserves=1 is passed to
it. The tests are changed here to reflect that. Note that however the
tests were buggy already before this change because the transfer's
"from" and "to" branches were the same and so the transfer should have
failed due to the error DestinationEqualsHolding, but futher though
the transferbook() code was buggy and it override the
DestinationEqualsHolding checking totally if there was a transfer! So
the tests were earlier working due to a bug in transferbook().

To test):
   1) Make sure the new test scenarios make sense
   2) prove t/db_dependent/Circulation/transferbook.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
t/db_dependent/Circulation/transferbook.t