Bug 15244: t/db_dependent/Reserves.t depends on external data/configuration

Test 14 in t/db_dependent/Reserves.t fails if syspref LocalHoldsPriority is
set to "[Give] priority for filling holds to patrons whose...

To verify:
- Set syspref as above and run test. Test 14 fails.
- Set syspref to [Don't give] and run test agein, it passes OK.

To test:
- Apply patch
- Run test again with syspref set / not set
Expected result: In both cases test should pass

(AMended to change bug title)

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Marc Véron 2015-12-01 20:22:27 +01:00 committed by Kyle M Hall
parent a102ccd48f
commit ae5962cab4

View file

@ -280,6 +280,10 @@ is( $messages->{ResFound}->{borrowernumber},
# Return the FPL item at FPL. The hold that should be triggered is
# the one placed by the RPL patron, as that patron is first in line
# and RPL imposes no restrictions on whose holds its items can fill.
# Ensure that the preference 'LocalHoldsPriority' is not set (Bug 15244):
C4::Context->set_preference( 'LocalHoldsPriority', '' );
(undef, $messages, undef, undef) = AddReturn('bug10272_FPL', 'FPL');
is( $messages->{ResFound}->{borrowernumber},
$requesters{'RPL'},