Bugzilla – Attachment 54542 Details for
Bug 17140
Incorrect rounding in total fines calculations, part 2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17140: Test to cover more rounding issues in fines calculations
Bug-17140-Test-to-cover-more-rounding-issues-in-fi.patch (text/plain), 1.67 KB, created by
Lari Taskula
on 2016-08-17 15:39:27 UTC
(
hide
)
Description:
Bug 17140: Test to cover more rounding issues in fines calculations
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2016-08-17 15:39:27 UTC
Size:
1.67 KB
patch
obsolete
>From 47346ebe3b585d58da2cde0d8f144f17877c4674 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <larit@student.uef.fi> >Date: Wed, 17 Aug 2016 18:36:57 +0300 >Subject: [PATCH] Bug 17140: Test to cover more rounding issues in fines > calculations > >To test: >1. Run t/db_dependent/Members.t >--- > t/db_dependent/Members.t | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Members.t b/t/db_dependent/Members.t >index 006207b..e06a0ed 100755 >--- a/t/db_dependent/Members.t >+++ b/t/db_dependent/Members.t >@@ -398,9 +398,10 @@ is( Check_Userid( C4::Context->config('user'), '' ), 0, > > subtest 'GetMemberAccountRecords' => sub { > >- plan tests => 2; >+ plan tests => 3; > > my $borrowernumber = $builder->build({ source => 'Borrower' })->{ borrowernumber }; >+ my $borrowernumber2 = $builder->build({ source => 'Borrower' })->{ borrowernumber }; > my $accountline_1 = $builder->build({ > source => 'Accountline', > value => { >@@ -412,6 +413,17 @@ subtest 'GetMemberAccountRecords' => sub { > my ($total,undef,undef) = GetMemberAccountRecords( $borrowernumber ); > is( $total , 64.60, "Rounding works correctly in total calculation (single value)" ); > >+ my $accountline_3 = $builder->build({ >+ source => 'Accountline', >+ value => { >+ borrowernumber => $borrowernumber2, >+ amountoutstanding => 1.14 >+ } >+ }); >+ >+ my ($total2,undef,undef) = GetMemberAccountRecords( $borrowernumber2 ); >+ ok($total2==1.14, "Rounding works correctly in total calculation (another single value)" ); >+ > my $accountline_2 = $builder->build({ > source => 'Accountline', > value => { >-- >1.9.1
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 17140
:
54542
|
54565
|
54566
|
54611
|
54642
|
54643
|
82375
|
83467
|
86044
|
86051
|
93553
|
93554
|
93678
|
93715
|
93716
|
93717