Bugzilla – Attachment 57913 Details for
Bug 17569
Move GetUpcomingMembershipExpires to Koha::Patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17569: [QA Follow-up] Small changes
Bug-17569-QA-Follow-up-Small-changes.patch (text/plain), 2.97 KB, created by
Marcel de Rooy
on 2016-12-02 09:59:23 UTC
(
hide
)
Description:
Bug 17569: [QA Follow-up] Small changes
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-12-02 09:59:23 UTC
Size:
2.97 KB
patch
obsolete
>From c3204ae5e501d7a4f7bf562f3f358b1f002aab6b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 2 Dec 2016 10:30:55 +0100 >Subject: [PATCH] Bug 17569: [QA Follow-up] Small changes >Content-Type: text/plain; charset=utf-8 > >Patron.pm: Adds two missing semicolons at the last statement. Not strictly >needed, but strongly recommended. >Patrons.t: Add a test description, remove two comments that refer to >previously hardcoded dates. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Patron.pm | 4 ++-- > t/db_dependent/Koha/Patrons.t | 6 ++---- > 2 files changed, 4 insertions(+), 6 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index a9c3f8a..52df139 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -124,12 +124,12 @@ sub guarantor { > sub image { > my ( $self ) = @_; > >- return Koha::Patron::Images->find( $self->borrowernumber ) >+ return Koha::Patron::Images->find( $self->borrowernumber ); > } > > sub library { > my ( $self ) = @_; >- return Koha::Library->_new_from_dbic($self->_result->branchcode) >+ return Koha::Library->_new_from_dbic($self->_result->branchcode); > } > > =head3 guarantees >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index e81e7af..8cfff2c 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -415,7 +415,7 @@ subtest 'search_upcoming_membership_expires' => sub { > > # Test with branch > $upcoming_mem_expires = Koha::Patrons->search_upcoming_membership_expires({ 'me.branchcode' => $library->{branchcode} }); >- is( $upcoming_mem_expires->count, 1, ); >+ is( $upcoming_mem_expires->count, 1, 'Test with branch parameter' ); > my $expired = $upcoming_mem_expires->next; > is( $expired->surname, $patron_1->{surname}, 'Get upcoming membership expires should return the correct patron.' ); > is( $expired->library->branchemail, $library->{branchemail}, 'Get upcoming membership expires should return the correct patron.' ); >@@ -433,11 +433,9 @@ subtest 'search_upcoming_membership_expires' => sub { > # Test the before parameter > t::lib::Mocks::mock_preference( 'MembershipExpiryDaysNotice', 15 ); > $upcoming_mem_expires = Koha::Patrons->search_upcoming_membership_expires({ 'me.branchcode' => $library->{branchcode}, before => $nb_of_days_before }); >- # Expect 29/6 and 30/6 >- is( $upcoming_mem_expires->count, 2, 'Expect two results for before==1'); >+ is( $upcoming_mem_expires->count, 2, 'Expect two results for before'); > # Test after parameter also > $upcoming_mem_expires = Koha::Patrons->search_upcoming_membership_expires({ 'me.branchcode' => $library->{branchcode}, before => $nb_of_days_before, after => $nb_of_days_after }); >- # Expect 29/6, 30/6 and 2/7 > is( $upcoming_mem_expires->count, 3, 'Expect three results when adding after' ); > Koha::Patrons->search({ borrowernumber => { in => [ $patron_1->{borrowernumber}, $patron_2->{borrowernumber}, $patron_3->{borrowernumber} ] } })->delete; > }; >-- >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 17569
:
57265
|
57266
|
57267
|
57294
|
57295
|
57315
|
57316
|
57317
|
57318
|
57319
|
57894
|
57895
|
57896
|
57897
|
57898
|
57908
|
57909
|
57910
|
57911
|
57912
|
57913
|
58478
|
58479
|
58480
|
58481
|
58482
|
58483