Bugzilla – Attachment 43587 Details for
Bug 7560
SIP Self Checkout Ignoring Fines Thresholds for Not Being able to Check Out Books
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7560 [QA Followup] - Fix up unit test
Bug-7560-QA-Followup---Fix-up-unit-test.patch (text/plain), 2.67 KB, created by
Kyle M Hall (khall)
on 2015-10-19 11:15:53 UTC
(
hide
)
Description:
Bug 7560 [QA Followup] - Fix up unit test
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-10-19 11:15:53 UTC
Size:
2.67 KB
patch
obsolete
>From 34766df0aa22db6150bf22a27fbf9a60a7a9b6e0 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 19 Oct 2015 07:15:22 -0400 >Subject: [PATCH] Bug 7560 [QA Followup] - Fix up unit test > >--- > t/db_dependent/Accounts.t | 59 ++++++++++++++++++++------------------------ > 1 files changed, 27 insertions(+), 32 deletions(-) > >diff --git a/t/db_dependent/Accounts.t b/t/db_dependent/Accounts.t >index 95a3df2..024154c 100644 >--- a/t/db_dependent/Accounts.t >+++ b/t/db_dependent/Accounts.t >@@ -291,48 +291,43 @@ subtest "makepartialpayment() tests" => sub { > } > }; > >-subtest "makepartialpayment() tests" => sub { >+subtest "GetTotalFines tests" => sub { > > plan tests => 1; > > my $categorycode = $builder->build( { source => 'Category' } )->{categorycode}; > >- my $borrower = Koha::Borrower->new( >+ my $borrower = $builder->build( > { >- surname => 'Hall', >- firstname => 'Kyle', >- categorycode => $categorycode, >- branchcode => $branchcode, >+ source => 'Borrower', >+ value => { >+ categorycode => $categorycode, >+ branchcode => $branchcode, >+ } > } >- )->store(); >+ ); > >- my $sth = $dbh->prepare( >- q{ >-INSERT INTO accountlines ( >- borrowernumber , >- accountno , >- itemnumber , >- date , >- amount , >- description , >- dispute , >- accounttype , >- amountoutstanding , >- lastincrement , >- timestamp , >- notify_id , >- notify_level , >- note , >- manager_id >- ) >-VALUES >- ( ?, '32766', NULL , '2013-07-31', '1.000000', NULL , NULL , NULL , '1.000000', NULL , '2013-07-31 10:21:01', '0', '0', NULL , NULL), >- ( ?, '32767', NULL , '2013-07-31', '2.000000', NULL , NULL , NULL , '2.000000', NULL , '2013-07-31 10:21:01', '0', '0', NULL , NULL) >-} >+ my $accountline1 = $builder->build( >+ { >+ source => 'Accountline', >+ value => { >+ borrowernumber => $borrower->{borrowernumber}, >+ amountoutstanding => '1.00', >+ } >+ } >+ ); >+ >+ my $accountline2 = $builder->build( >+ { >+ source => 'Accountline', >+ value => { >+ borrowernumber => $borrower->{borrowernumber}, >+ amountoutstanding => '2.00', >+ } >+ } > ); >- $sth->execute( $borrower->borrowernumber, $borrower->borrowernumber ); > >- ok( GetTotalFines( $borrower->borrowernumber ) == 3, "GetTotalFines functions correctly" ); >+ is( GetTotalFines( $borrower->{borrowernumber} ), '3.000000', "GetTotalFines functions correctly" ); > }; > > $dbh->rollback; >-- >1.7.2.5
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 7560
:
7772
|
11475
|
16044
|
16045
|
16047
|
16048
|
18194
|
18195
|
18196
|
18198
|
18199
|
18200
|
20004
|
20005
|
20006
|
42595
|
42596
|
42597
|
43587
|
43777
|
50398