From 9f3c5d20195a2eb795f73f7f64994a2cc6b93b20 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. Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Lucas Gass (cherry picked from commit 5c743feec76a1b4032cf64cb0feed375b98bd0a5) Signed-off-by: Paul Derscheid --- 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 979f378a25..a65bacbe10 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 );