From 8a038a0491e79f373c6537bb8abef239a222bc20 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 16 Jul 2025 12:32:52 +0200 Subject: [PATCH] Bug 40409: Make Overdues.t fail The test is wrong, the item is not correctly checked in, it should fail. --- t/db_dependent/Overdues.t | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/t/db_dependent/Overdues.t b/t/db_dependent/Overdues.t index 979f378a25f..a65bacbe10b 100755 --- a/t/db_dependent/Overdues.t +++ b/t/db_dependent/Overdues.t @@ -549,10 +549,8 @@ subtest 'UpdateFine tests' => sub { { order_by => { '-asc' => 'accountlines_id' } } ); is( $fines->count, 4, "New amount should be 0 so no fine added" ); - ok( - C4::Circulation::AddReturn( $item_1->barcode, $item_1->homebranch, 1 ), - "Returning the item and forgiving fines succeeds" - ); + my @r = C4::Circulation::AddReturn( $item_1->barcode, $item_1->homebranch, 1 ); + is( $r[1]->{WasReturned}, 1, "Returning the item and forgiving fines succeeds" ); t::lib::Mocks::mock_preference( 'MaxFine', 0 ); -- 2.34.1