Bug 20815: Do not use compare float with precision

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Kyle M Hall 2020-07-06 07:03:21 -04:00 committed by Jonathan Druart
parent e453f74cfd
commit 3b8b542f9e
1 changed files with 8 additions and 8 deletions

View File

@ -4131,10 +4131,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 {
@ -4206,10 +4206,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 {
@ -4281,10 +4281,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 {
@ -4356,10 +4356,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;