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 <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 commit1e2e1247c9) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit86612541a4) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Conflicts: t/db_dependent/Circulation/NoIssuesChargeGuarantees.t
This commit is contained in:
parent
0a31ee40d4
commit
d2aaa2fbc8
|
|
@ -20,6 +20,7 @@ use Modern::Perl;
|
|||
use Test::More tests => 2;
|
||||
|
||||
use t::lib::TestBuilder;
|
||||
use t::lib::Mocks;
|
||||
|
||||
use C4::Accounts qw( manualinvoice );
|
||||
use C4::Circulation qw( CanBookBeIssued );
|
||||
|
|
@ -53,7 +54,8 @@ my $guarantee = $builder->build(
|
|||
}
|
||||
);
|
||||
|
||||
C4::Context->set_preference( 'NoIssuesChargeGuarantees', '5.00' );
|
||||
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" );
|
||||
|
|
|
|||
Loading…
Reference in New Issue