Bug 15244: t/db_dependent/Reserves.t depends on external data/configuration
authorMarc Véron <veron@veron.ch>
Tue, 1 Dec 2015 19:22:27 +0000 (20:22 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 11 Dec 2015 16:08:50 +0000 (16:08 +0000)
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>
t/db_dependent/Reserves.t

index 7301757..8a6ab1c 100755 (executable)
@@ -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'},