Bugzilla – Attachment 37085 Details for
Bug 13841
Returns via backdating or SIP2 can create new fines with an amount outstanding of 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 13841 - Unit Test
PASSED-QA-Bug-13841---Unit-Test.patch (text/plain), 2.00 KB, created by
Katrin Fischer
on 2015-03-22 19:14:27 UTC
(
hide
)
Description:
[PASSED QA] Bug 13841 - Unit Test
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-03-22 19:14:27 UTC
Size:
2.00 KB
patch
obsolete
>From 9f5dc6f0f79b8a07e8e0ca1363c25673fec09342 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 16 Mar 2015 10:15:54 -0400 >Subject: [PATCH] [PASSED QA] Bug 13841 - Unit Test > >Signed-off-by: Jen DeMuth <jdemuth@roseville.ca.us> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Circulation.t | 38 +++++++++++++++++++++++++++++++++++++- > 1 file changed, 37 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index d020d24..4741c4c 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -23,10 +23,11 @@ use C4::Branch; > use C4::Items; > use C4::Members; > use C4::Reserves; >+use C4::Overdues qw(UpdateFine); > use Koha::DateUtils; > use Koha::Database; > >-use Test::More tests => 59; >+use Test::More tests => 60; > > BEGIN { > use_ok('C4::Circulation'); >@@ -539,6 +540,41 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > > } > >+{ >+ my $barcode = '1234567890'; >+ my $branch = 'MPL'; >+ >+ my $biblio = MARC::Record->new(); >+ my ($biblionumber, $biblioitemnumber) = AddBiblio($biblio, ''); >+ >+ #Create third item >+ my ( undef, undef, $itemnumber ) = AddItem( >+ { >+ homebranch => $branch, >+ holdingbranch => $branch, >+ barcode => $barcode >+ }, >+ $biblionumber >+ ); >+ >+ # Create a borrower >+ my %a_borrower_data = ( >+ firstname => 'Kyle', >+ surname => 'Hall', >+ categorycode => 'S', >+ branchcode => $branch, >+ ); >+ >+ my $borrowernumber = AddMember(%a_borrower_data); >+ >+ UpdateFine( $itemnumber, $borrowernumber, 0 ); >+ >+ my $hr = $dbh->selectrow_hashref(q{SELECT COUNT(*) AS count FROM accountlines WHERE borrowernumber = ? AND itemnumber = ?}, undef, $borrowernumber, $itemnumber ); >+ my $count = $hr->{count}; >+ >+ is ( $count, 0, "Calling UpdateFine on non-existant fine with an amount of 0 does not result in an empty fine" ); >+} >+ > $dbh->rollback; > > 1; >-- >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 13841
:
36930
|
36931
|
36964
|
36965
| 37085 |
37086