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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 15 Jun 2021 09:42:35 +0000 (11:42 +0200)
commitb0f9033f135aef4c114a335c477be22603f82e90
tree2fe2bece669bd9007ef75a9f49cb5f153989da97
parentc66ddc0926984b605eca70b40dab19c91c508a83
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>
t/db_dependent/Circulation/transferbook.t