From 2ef445f6dd55da6022b77aca25929cc936aec044 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Fri, 13 Jan 2023 05:21:09 +0000 Subject: [PATCH] Bug 32602: Unit tests Test plan: 1. sudo koha-shell 2. prove -v t/db_dependent/SIP/Transaction.t 3. Confirm all tests pass Sponsored-by: Horowhenua District Council, New Zealand --- t/db_dependent/SIP/Transaction.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/SIP/Transaction.t b/t/db_dependent/SIP/Transaction.t index e1e15ccb95..9ac4889e63 100755 --- a/t/db_dependent/SIP/Transaction.t +++ b/t/db_dependent/SIP/Transaction.t @@ -440,7 +440,7 @@ subtest do_checkin => sub { }; subtest do_checkout_with_patron_blocked => sub { - plan tests => 4; + plan tests => 5; my $library = $builder->build_object( { class => 'Koha::Libraries' } ); my $institution = { @@ -495,6 +495,10 @@ subtest do_checkout_with_patron_blocked => sub { $circ = $ils->checkout($fines_patron->cardnumber, $item->barcode); is( $circ->{screen_msg}, 'Patron has fines', "Got correct fines screen message" ); + t::lib::Mocks::mock_preference( 'IssuingInProcess', 1 ); + $circ = $ils->checkout($fines_patron->cardnumber, $item->barcode); + is( $circ->{screen_msg}, '', "Patron got no fines screen message when IssuingInProcess system preference is enabled" ); + my $debarred_patron = $builder->build_object( { class => 'Koha::Patrons', -- 2.20.1