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 |
- |
|
|