From 5abb27e7e0c2e1e3d3b3039572f3cdcadd670c04 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 10 Sep 2015 16:39:51 +0200 Subject: [PATCH] [Signed-off] Bug 14801: Fix Reserves.t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following errors: not ok 59 - Bug 14464 - No fines at beginning ok 60 - Bug 14464 - 1st reserve correctly created not ok 61 - Bug 14464 - No fines after cancelling reserve with no charge configured ok 62 - Bug 14464 - 2nd reserve correctly created not ok 63 - Bug 14464 - No fines after cancelling reserve with no charge desired Signed-off-by: Marcel de Rooy Signed-off-by: Marc VĂ©ron --- t/db_dependent/Reserves.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index 107cee9..c0007ba 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -536,7 +536,7 @@ ok( !C4::Reserves::OnShelfHoldsAllowed($item, $borrower), "OnShelfHoldsAllowed() $dbh->do("DELETE FROM reserves WHERE biblionumber=?",undef,($bibnum)); my ( undef, undef, $bz14464_fines ) = GetMemberIssuesAndFines( $borrowernumber ); -ok( !$bz14464_fines, 'Bug 14464 - No fines at beginning' ); +is( $bz14464_fines==0, 1, 'Bug 14464 - No fines at beginning' ); # First, test cancelling a reserve when there's no charge configured. t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelayCharge', 0); @@ -560,7 +560,7 @@ ok( $bz14464_reserve, 'Bug 14464 - 1st reserve correctly created' ); CancelReserve({ reserve_id => $bz14464_reserve, charge_cancel_fee => 1 }); ( undef, undef, $bz14464_fines ) = GetMemberIssuesAndFines( $borrowernumber ); -ok( !$bz14464_fines, 'Bug 14464 - No fines after cancelling reserve with no charge configured' ); +is( $bz14464_fines==0, 1, 'Bug 14464 - No fines after cancelling reserve with no charge configured' ); # Then, test cancelling a reserve when there's no charge desired. t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelayCharge', 42); @@ -584,7 +584,7 @@ ok( $bz14464_reserve, 'Bug 14464 - 2nd reserve correctly created' ); CancelReserve({ reserve_id => $bz14464_reserve }); ( undef, undef, $bz14464_fines ) = GetMemberIssuesAndFines( $borrowernumber ); -ok( !$bz14464_fines, 'Bug 14464 - No fines after cancelling reserve with no charge desired' ); +is( $bz14464_fines==0, 1, 'Bug 14464 - No fines after cancelling reserve with no charge desired' ); # Finally, test cancelling a reserve when there's a charge desired and configured. $bz14464_reserve = AddReserve( -- 1.7.10.4