From 6a08d22460f96ca4f45303b2b54b6d668afa1868 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

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 5b9630a..698134a 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 51a4785..98e1f40 100644
--- a/t/db_dependent/Koha/Patrons.t
+++ b/t/db_dependent/Koha/Patrons.t
@@ -569,7 +569,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.' );
@@ -587,11 +587,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