Bugzilla – Attachment 55425 Details for
Bug 16851
Move HasOverdues to Koha::Patron->has_overdues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16851 [QA Followup] - Fix Unit Tests
Bug-16851-QA-Followup---Fix-Unit-Tests.patch (text/plain), 1.84 KB, created by
Kyle M Hall (khall)
on 2016-09-09 11:20:53 UTC
(
hide
)
Description:
Bug 16851 [QA Followup] - Fix Unit Tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-09-09 11:20:53 UTC
Size:
1.84 KB
patch
obsolete
>From bf4d17ff275e49360f48915c6f020d917a95846d Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 9 Sep 2016 10:21:33 +0000 >Subject: [PATCH] Bug 16851 [QA Followup] - Fix Unit Tests > >--- > t/db_dependent/Koha/Patrons.t | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index 345f530..e11244b 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -1,4 +1,5 @@ > #!/usr/bin/perl >+use Carp::Always; > > # Copyright 2015 Koha Development team > # >@@ -19,7 +20,7 @@ > > use Modern::Perl; > >-use Test::More tests => 7; >+use Test::More tests => 8; > use Test::Warn; > > use C4::Circulation; >@@ -128,14 +129,14 @@ subtest 'has_overdues' => sub { > is( $retrieved_patron->has_overdues, 0, ); > > my $tomorrow = DateTime->today( time_zone => C4::Context->tz() )->add( days => 1 ); >- my $issue = AddIssue( $new_patron_1->unblessed, $item_1->{barcode} ); >+ my $issue = Koha::Issue->new({ borrowernumber => $new_patron_1->id, itemnumber => $item_1->{itemnumber}, date_due => $tomorrow, branchcode => $library->{branchcode} })->store(); > is( $retrieved_patron->has_overdues, 0, ); >- AddReturn( $item_1->{barcode} ); >+ $issue->delete(); > my $yesterday = DateTime->today(time_zone => C4::Context->tz())->add( days => -1 ); >- $issue = AddIssue( $new_patron_1->unblessed, $item_1->{barcode}, $yesterday ); >+ $issue = Koha::Issue->new({ borrowernumber => $new_patron_1->id, itemnumber => $item_1->{itemnumber}, date_due => $yesterday, branchcode => $library->{branchcode} })->store(); > $retrieved_patron = Koha::Patrons->find( $new_patron_1->borrowernumber ); > is( $retrieved_patron->has_overdues, 1, ); >- AddReturn( $item_1->{barcode} ); >+ $issue->delete(); > }; > > subtest 'update_password' => sub { >-- >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 16851
:
53094
|
53325
|
53511
|
53996
|
55190
|
55425
|
55426