From 542d847cc7e7f1dc922981141ef9c4e3a72c370d Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 27 Aug 2025 14:32:58 +0100 Subject: [PATCH] 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 --- t/db_dependent/Circulation/CanBookBeIssued.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Circulation/CanBookBeIssued.t b/t/db_dependent/Circulation/CanBookBeIssued.t index dbb686ff497..2f84b4a1cf0 100755 --- a/t/db_dependent/Circulation/CanBookBeIssued.t +++ b/t/db_dependent/Circulation/CanBookBeIssued.t @@ -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|); -- 2.51.0