Lines 195-204
subtest 'is_going_to_expired' => sub {
Link Here
|
195 |
is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is not set'); |
195 |
is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is not set'); |
196 |
$patron->dateexpiry( '0000-00-00' )->store->discard_changes; |
196 |
$patron->dateexpiry( '0000-00-00' )->store->discard_changes; |
197 |
is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is not 0000-00-00'); |
197 |
is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is not 0000-00-00'); |
|
|
198 |
|
199 |
t::lib::Mocks::mock_preference('NotifyBorrowerDeparture', 0); |
198 |
$patron->dateexpiry( dt_from_string )->store->discard_changes; |
200 |
$patron->dateexpiry( dt_from_string )->store->discard_changes; |
199 |
is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is today'); |
201 |
is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is today'); |
200 |
|
202 |
|
201 |
t::lib::Mocks::mock_preference('NotifyBorrowerDeparture', 0); |
|
|
202 |
$patron->dateexpiry( dt_from_string )->store->discard_changes; |
203 |
$patron->dateexpiry( dt_from_string )->store->discard_changes; |
203 |
is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is today and pref is 0'); |
204 |
is( $patron->is_going_to_expired, 0, 'Patron should not be considered going to expire if dateexpiry is today and pref is 0'); |
204 |
|
205 |
|
205 |
- |
|
|