From 56d659d82046eb7a41d71fe29ec4c9071e61328e Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 6 Jul 2020 07:03:21 -0400 Subject: [PATCH] Bug 20815: Do not use compare float with precision --- t/db_dependent/Circulation.t | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index 667a97f10f..33cc2d0788 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -3995,10 +3995,10 @@ subtest 'Tests for NoRefundOnLostReturnedItemsAge = undef' => sub { } ); ok( $a, "Found accountline for lost fee" ); - is( $a->amountoutstanding, '42.000000', "Lost fee charged correctly" ); + is( $a->amountoutstanding + 0, 42, "Lost fee charged correctly" ); my ( $doreturn, $messages ) = AddReturn( $item->barcode, $library->{branchcode}, undef, dt_from_string ); $a = Koha::Account::Lines->find( $a->id ); - is( $a->amountoutstanding, '0.000000', "Lost fee was refunded" ); + is( $a->amountoutstanding + 0, 0, "Lost fee was refunded" ); }; subtest 'Tests for NoRefundOnLostReturnedItemsAge > length of days item has been lost' => sub { @@ -4070,10 +4070,10 @@ subtest 'Tests for NoRefundOnLostReturnedItemsAge > length of days item has been } ); ok( $a, "Found accountline for lost fee" ); - is( $a->amountoutstanding, '42.000000', "Lost fee charged correctly" ); + is( $a->amountoutstanding + 0, 42, "Lost fee charged correctly" ); my ( $doreturn, $messages ) = AddReturn( $item->barcode, $library->{branchcode}, undef, dt_from_string ); $a = Koha::Account::Lines->find( $a->id ); - is( $a->amountoutstanding, '0.000000', "Lost fee was refunded" ); + is( $a->amountoutstanding + 0, 0, "Lost fee was refunded" ); }; subtest 'Tests for NoRefundOnLostReturnedItemsAge = length of days item has been lost' => sub { @@ -4145,10 +4145,10 @@ subtest 'Tests for NoRefundOnLostReturnedItemsAge = length of days item has been } ); ok( $a, "Found accountline for lost fee" ); - is( $a->amountoutstanding, '42.000000', "Lost fee charged correctly" ); + is( $a->amountoutstanding + 0, 42, "Lost fee charged correctly" ); my ( $doreturn, $messages ) = AddReturn( $item->barcode, $library->{branchcode}, undef, dt_from_string ); $a = Koha::Account::Lines->find( $a->id ); - is( $a->amountoutstanding, '42.000000', "Lost fee was not refunded" ); + is( $a->amountoutstanding + 0, 42, "Lost fee was not refunded" ); }; subtest 'Tests for NoRefundOnLostReturnedItemsAge < length of days item has been lost' => sub { @@ -4220,10 +4220,10 @@ subtest 'Tests for NoRefundOnLostReturnedItemsAge < length of days item has been } ); ok( $a, "Found accountline for lost fee" ); - is( $a->amountoutstanding, '42.000000', "Lost fee charged correctly" ); + is( $a->amountoutstanding + 0, 42, "Lost fee charged correctly" ); my ( $doreturn, $messages ) = AddReturn( $item->barcode, $library->{branchcode}, undef, dt_from_string ); $a = Koha::Account::Lines->find( $a->id ); - is( $a->amountoutstanding, '42.000000', "Lost fee was not refunded" ); + is( $a->amountoutstanding + 0, 42, "Lost fee was not refunded" ); }; $schema->storage->txn_rollback; -- 2.24.1 (Apple Git-126)