Bugzilla – Attachment 66701 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.62 KB, created by
Julian Maurice
on 2017-09-01 10:44:13 UTC
(
hide
)
Description:
Bug 19076 - unit tests
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2017-09-01 10:44:13 UTC
Size:
2.62 KB
patch
obsolete
>From e214521ad73ac1afc0cac02f8a4374a3a63674cb 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 > >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > t/db_dependent/Circulation.t | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 361637e68e..c724883bf4 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 98; >+use Test::More tests => 100; > > 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); >@@ -476,6 +476,7 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > due => Koha::DateUtils::output_pref($five_weeks_ago) > } > ); >+ > t::lib::Mocks::mock_preference('RenewalLog', 0); > my $date = output_pref( { dt => dt_from_string(), datenonly => 1, dateformat => 'iso' } ); > my $old_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); >@@ -496,6 +497,16 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > is( $fines->next->accounttype, 'F', 'Fine on renewed item is closed out properly' ); > $fines->delete(); > >+ >+ my $old_issue_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["ISSUE"]) } ); >+ my $old_renew_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); >+ 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'); >+ >+ > t::lib::Mocks::mock_preference('OverduesBlockRenewing','blockitem'); > ( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber6); > is( $renewokay, 1, '(Bug 8236), Can renew, this item is not overdue'); >-- >2.11.0
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