From 74d13d33ca2a9ef5d4ac7050ee489ed23105731c Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 13 Sep 2017 12:06:50 +0000 Subject: [PATCH] Bug 19307: Mock the AllowFineOverride preference to ensure expected result To test: 1 - Set 'AllowFineOverride' to allow 2 - prove t/db_dependent/Circulation/NoIssuesChargeGuarantees.t 3 - 1 test fails 4 - Apply patch 5 - prove t/db_dependent/Circulation/NoIssuesChargeGuarantees.t 6 - All tests pass 7 - Set 'AllowFineOverride' to 'Don't allow' 8 - Tests should still pass Signed-off-by: David Bourgault Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart (cherry picked from commit 1e2e1247c9bcd15514dc395be891a9a3607e5ea5) Signed-off-by: Fridolin Somers (cherry picked from commit 86612541a45f6753b0ad87453a62fe8c9ba3047b) Signed-off-by: Katrin Fischer --- t/db_dependent/Circulation/NoIssuesChargeGuarantees.t | 1 + 1 file changed, 1 insertion(+) diff --git a/t/db_dependent/Circulation/NoIssuesChargeGuarantees.t b/t/db_dependent/Circulation/NoIssuesChargeGuarantees.t index dc2c8803e3..9a4170d4c1 100644 --- a/t/db_dependent/Circulation/NoIssuesChargeGuarantees.t +++ b/t/db_dependent/Circulation/NoIssuesChargeGuarantees.t @@ -55,6 +55,7 @@ my $guarantee = $builder->build( ); t::lib::Mocks::mock_preference( 'NoIssuesChargeGuarantees', '5.00' ); +t::lib::Mocks::mock_preference( 'AllowFineOverride', '' ); my ( $issuingimpossible, $needsconfirmation ) = CanBookBeIssued( $patron, $item->{barcode} ); is( $issuingimpossible->{DEBT_GUARANTEES}, undef, "Patron can check out item" ); -- 2.39.5