From 09daf22d13c9d9805413a42342a4ba20e6ef67be Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 12 Oct 2017 12:44:49 -0400 Subject: [PATCH] Bug 12768 - Fix up unit tests a bit more --- t/db_dependent/Circulation.t | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index ef95eeb..a2dbf33 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -778,7 +778,9 @@ C4::Context->dbh->do("DELETE FROM accountlines"); is( $offset->type, 'Fine', 'Account offset type is Fine' ); is( $offset->amount, '15.000000', 'Account offset amount is 15.00' ); - ModItem({ itype => 'BK' }, $biblionumber, $itemnumber, 1); + t::lib::Mocks::mock_preference('WhenLostForgiveFine','0'); + t::lib::Mocks::mock_preference('WhenLostChargeReplacementFee','0'); + LostItem( $itemnumber, 1 ); my $item = Koha::Database->new()->schema()->resultset('Item')->find($itemnumber); @@ -789,13 +791,10 @@ C4::Context->dbh->do("DELETE FROM accountlines"); undef, $renewing_borrower->{borrowernumber} ); - ok( $total_due == 12, 'Borrower only charged replacement fee with both WhenLostForgiveFine and WhenLostChargeReplacementFee enabled' ); + is( $total_due, '15.000000', 'Borrower only charged replacement fee with both WhenLostForgiveFine and WhenLostChargeReplacementFee enabled' ); C4::Context->dbh->do("DELETE FROM accountlines"); - t::lib::Mocks::mock_preference('WhenLostForgiveFine','0'); - t::lib::Mocks::mock_preference('WhenLostChargeReplacementFee','0'); - C4::Overdues::UpdateFine( { issue_id => $issue2->id(), -- 2.10.2