From b787ef9fd83765c42bcc4964968609bb777a9468 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 19 Apr 2018 12:19:17 -0300 Subject: [PATCH] Bug 18790: Prevent the tests to fail if precision changes --- t/db_dependent/Accounts.t | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t index 351290cdd0..2aba51ec2a 100644 --- a/t/db_dependent/Accounts.t +++ b/t/db_dependent/Accounts.t @@ -885,8 +885,8 @@ subtest "Koha::Account::Line::void tests" => sub { $line1->_result->discard_changes(); $line2->_result->discard_changes(); - is( $line1->amountoutstanding, '0.000000', 'First fee has amount outstanding of 0' ); - is( $line2->amountoutstanding, '0.000000', 'Second fee has amount outstanding of 0' ); + is( $line1->amountoutstanding+0, 0, 'First fee has amount outstanding of 0' ); + is( $line2->amountoutstanding+0, 0, 'Second fee has amount outstanding of 0' ); $account_payment->void(); @@ -897,11 +897,11 @@ subtest "Koha::Account::Line::void tests" => sub { $line2->_result->discard_changes(); is( $account_payment->accounttype, 'VOID', 'Voided payment accounttype is VOID' ); - is( $account_payment->amount, '0.000000', 'Voided payment amount is 0' ); - is( $account_payment->amountoutstanding, '0.000000', 'Voided payment amount outstanding is 0' ); + is( $account_payment->amount+0, 0, 'Voided payment amount is 0' ); + is( $account_payment->amountoutstanding+0, 0, 'Voided payment amount outstanding is 0' ); - is( $line1->amountoutstanding, '10.000000', 'First fee again has amount outstanding of 10' ); - is( $line2->amountoutstanding, '20.000000', 'Second fee again has amount outstanding of 20' ); + is( $line1->amountoutstanding+0, 10, 'First fee again has amount outstanding of 10' ); + is( $line2->amountoutstanding+0, 20, 'Second fee again has amount outstanding of 20' ); }; 1; -- 2.11.0