From 9424a8a51c965f7743561639faf72d84f117781a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 15 Nov 2016 11:16:03 +0000 Subject: [PATCH] Bug 17583: Mock the pref before tests --- 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 dc10ccb..e140937 100644 --- a/t/db_dependent/Koha/Patrons.t +++ b/t/db_dependent/Koha/Patrons.t @@ -195,10 +195,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