Bug 19307: Mock the AllowFineOverride preference to ensure expected result
authorNick Clemens <nick@bywatersolutions.com>
Wed, 13 Sep 2017 12:06:50 +0000 (12:06 +0000)
committerKatrin Fischer <katrin.fischer.83@web.de>
Sun, 29 Oct 2017 18:24:59 +0000 (19:24 +0100)
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 <david.bourgault@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1e2e1247c9bcd15514dc395be891a9a3607e5ea5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 86612541a45f6753b0ad87453a62fe8c9ba3047b)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

t/db_dependent/Circulation/NoIssuesChargeGuarantees.t

index dc2c880..9a4170d 100644 (file)
@@ -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" );