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:
Martin Renvoize 2025-08-27 14:32:58 +01:00 committed by Lucas Gass
parent 489780f3f9
commit 1660f68690
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 3 additions and 1 deletions

View File

@ -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|);