Bugzilla – Attachment 49495 Details for
Bug 15741
Incorrect rounding in total fines calculations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15741: (regression tests) Rounding is not calculated correctly
Bug-15741-regression-tests-Rounding-is-not-calcula.patch (text/plain), 1.91 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-03-23 23:36:00 UTC
(
hide
)
Description:
Bug 15741: (regression tests) Rounding is not calculated correctly
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-03-23 23:36:00 UTC
Size:
1.91 KB
patch
obsolete
>From 88faa058269005a88708da491671f861531bb8a7 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 23 Mar 2016 20:28:56 -0300 >Subject: [PATCH] Bug 15741: (regression tests) Rounding is not calculated > correctly > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Members.t | 31 ++++++++++++++++++++++++++++++- > 1 file changed, 30 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Members.t b/t/db_dependent/Members.t >index f0b80fe..cc89440 100755 >--- a/t/db_dependent/Members.t >+++ b/t/db_dependent/Members.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 58; >+use Test::More tests => 59; > use Test::MockModule; > use Data::Dumper; > use C4::Context; >@@ -245,6 +245,35 @@ ok( $borrower->{userid}, 'A userid should have been generated correctly' ); > is( Check_Userid( C4::Context->config('user'), '' ), 0, > 'Check_Userid should return 0 for the DB user (Bug 12226)'); > >+subtest 'GetMemberAccountRecords' => sub { >+ >+ plan tests => 2; >+ >+ my $borrowernumber = $builder->build({ source => 'Borrower' })->{ borrowernumber }; >+ my $accountline_1 = $builder->build({ >+ source => 'Accountline', >+ value => { >+ borrowernumber => $borrowernumber, >+ amountoutstanding => 64.60 >+ } >+ }); >+ >+ my ($total,undef,undef) = GetMemberAccountRecords( $borrowernumber ); >+ is( $total , 64.60, "Rounding works correctly in total calculation (single value)" ); >+ >+ my $accountline_2 = $builder->build({ >+ source => 'Accountline', >+ value => { >+ borrowernumber => $borrowernumber, >+ amountoutstanding => 10.65 >+ } >+ }); >+ >+ ($total,undef,undef) = GetMemberAccountRecords( $borrowernumber ); >+ is( $total , 75.25, "Rounding works correctly in total calculation (multiple values)" ); >+ >+}; >+ > subtest 'GetMemberAccountBalance' => sub { > > plan tests => 10; >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15741
:
48776
|
49087
|
49484
| 49495 |
49496