Lines 19-25
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 27; |
22 |
use Test::More tests => 28; |
23 |
use Test::Exception; |
23 |
use Test::Exception; |
24 |
use Test::Warn; |
24 |
use Test::Warn; |
25 |
use Time::Fake; |
25 |
use Time::Fake; |
Lines 339-345
subtest 'is_active' => sub {
Link Here
|
339 |
|
339 |
|
340 |
# Check lastseen, test days parameter |
340 |
# Check lastseen, test days parameter |
341 |
t::lib::Mocks::mock_preference( 'TrackLastPatronActivity', 1 ); |
341 |
t::lib::Mocks::mock_preference( 'TrackLastPatronActivity', 1 ); |
342 |
$patron->track_login; |
342 |
$patron->update_lastseen('login'); |
343 |
is( $patron->is_active( { days => 1 } ), 1, 'Just logged in' ); |
343 |
is( $patron->is_active( { days => 1 } ), 1, 'Just logged in' ); |
344 |
my $ago = dt_from_string->subtract( days => 2 ); |
344 |
my $ago = dt_from_string->subtract( days => 2 ); |
345 |
$patron->lastseen($ago)->store; |
345 |
$patron->lastseen($ago)->store; |
346 |
- |
|
|