Bug 9762: (follow-up) Fix failing CanBookBeIssued test
The test was failing because: 1. IssuingInProcess preference was not explicitly set, affecting the code path for message logging 2. The patron category had a random noissuescharge value that overrode the system preference Fixed by: - Setting IssuingInProcess to 0 to ensure correct code path - Setting patron category noissuescharge to undef to use system preference Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
489780f3f9
commit
1660f68690
|
|
@ -63,7 +63,8 @@ my $patron_category = $builder->build(
|
|||
{
|
||||
source => 'Category',
|
||||
value => {
|
||||
category_type => 'P',
|
||||
category_type => 'P',
|
||||
noissuescharge => undef,
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -176,6 +177,7 @@ is( $message_log->[0], 'too many checkout', 'Checkout limit reached message disp
|
|||
t::lib::Mocks::mock_preference( 'AllFinesNeedOverride', 0 );
|
||||
t::lib::Mocks::mock_preference( 'AllowFineOverride', 1 );
|
||||
t::lib::Mocks::mock_preference( 'noissuescharge', 5 );
|
||||
t::lib::Mocks::mock_preference( 'IssuingInProcess', 0 );
|
||||
|
||||
$dbh->do(q|DELETE FROM circulation_rules|);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue