Bugzilla – Attachment 36964 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]
Bug 13841 - Unit Test
Bug-13841---Unit-Test.patch (text/plain), 1.94 KB, created by
Biblibre Sandboxes
on 2015-03-17 18:49:35 UTC
(
hide
)
Description:
Bug 13841 - Unit Test
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2015-03-17 18:49:35 UTC
Size:
1.94 KB
patch
obsolete
>From 04c3ba748d743a5e2a1e044421138b26b44d10d8 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] Bug 13841 - Unit Test > >Signed-off-by: Jen DeMuth <jdemuth@roseville.ca.us> >--- > 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.7.10.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 13841
:
36930
|
36931
|
36964
|
36965
|
37085
|
37086