Bugzilla – Attachment 57919 Details for
Bug 17583
Use Koha::Patron->is_expired from circulation.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17583: Mock the pref before tests
Bug-17583-Mock-the-pref-before-tests.patch (text/plain), 1.52 KB, created by
Marcel de Rooy
on 2016-12-02 10:59:18 UTC
(
hide
)
Description:
Bug 17583: Mock the pref before tests
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-12-02 10:59:18 UTC
Size:
1.52 KB
patch
obsolete
>From 624b1cc09e19bad9e10b786e7e34bb8f0fbab5a0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 15 Nov 2016 11:16:03 +0000 >Subject: [PATCH] Bug 17583: Mock the pref before tests >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Koha/Patrons.t | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index 9047de8..2c71d21 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -198,10 +198,11 @@ subtest 'is_going_to_expired' => sub { > is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is not set'); > $patron->dateexpiry( '0000-00-00' )->store->discard_changes; > is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is not 0000-00-00'); >+ >+ t::lib::Mocks::mock_preference('NotifyBorrowerDeparture', 0); > $patron->dateexpiry( dt_from_string )->store->discard_changes; > is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is today'); > >- t::lib::Mocks::mock_preference('NotifyBorrowerDeparture', 0); > $patron->dateexpiry( dt_from_string )->store->discard_changes; > is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is today and pref is 0'); > >-- >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 17583
:
57329
|
57330
|
57334
|
57364
|
57380
|
57384
|
57387
|
57488
|
57523
|
57524
|
57525
|
57526
|
57527
|
57528
|
57888
|
57889
|
57890
|
57891
|
57892
|
57893
|
57914
|
57915
|
57916
|
57917
|
57918
| 57919 |
57920