Bugzilla – Attachment 65829 Details for
Bug 19076
Renewal via Checkout screen is logged as both a renewal and a checkout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19076 - unit tests
Bug-19076---unit-tests.patch (text/plain), 2.23 KB, created by
Nick Clemens
on 2017-08-10 15:24:21 UTC
(
hide
)
Description:
Bug 19076 - unit tests
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2017-08-10 15:24:21 UTC
Size:
2.23 KB
patch
obsolete
>From 998d42fc5c762a3a5782120bd4303ab486b6a6b2 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 10 Aug 2017 15:20:19 +0000 >Subject: [PATCH] Bug 19076 - unit tests > >--- > t/db_dependent/Circulation.t | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 9319924..1d35426 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 96; >+use Test::More tests => 98; > > use DateTime; > >@@ -455,7 +455,7 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > $biblionumber > ); > my $datedue6 = AddIssue( $renewing_borrower, $barcode6); >- is (defined $datedue6, 1, "Item 2 checked out, due date: $datedue6"); >+ is (defined $datedue6, 1, "Item 2 checked out, due date: ".$datedue6->date_due); > > my $now = dt_from_string(); > my $five_weeks = DateTime::Duration->new(weeks => 5); >@@ -489,6 +489,16 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > $new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); > is ($new_log_size, $old_log_size + 1, 'renew log successfully added'); > >+ my $old_issue_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["ISSUE"]) } ); >+ my $old_renew_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); >+ print $datedue6->date_due."\n"; >+ AddIssue( $renewing_borrower,$barcode7,Koha::DateUtils::output_pref({str=>$datedue6->date_due, dateformat =>'iso'}),0,$date, 0, undef ); >+ $new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); >+ is ($new_log_size, $old_renew_log_size + 1, 'renew log successfully added when renewed via issuing'); >+ $new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["ISSUE"]) } ); >+ is ($new_log_size, $old_issue_log_size, 'renew not logged as issue when renewed via issuing'); >+ >+ > > $fine = $schema->resultset('Accountline')->single( { borrowernumber => $renewing_borrower->{borrowernumber}, itemnumber => $itemnumber7 } ); > is( $fine->accounttype, 'F', 'Fine on renewed item is closed out properly' ); >-- >2.1.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 19076
:
65829
|
65830
|
65907
|
65908
|
65916
|
65939
|
66701
|
66702
|
66703