View | Details | Raw Unified | Return to bug 33997
Collapse All | Expand All

(-)a/t/db_dependent/Members.t (-2 / +4 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 53;
20
use Test::More tests => 55;
21
use Test::MockModule;
21
use Test::MockModule;
22
use Test::Exception;
22
use Test::Exception;
23
23
Lines 336-348 my $patron2 = $builder->build({ Link Here
336
    value => {
336
    value => {
337
        lastseen => undef,
337
        lastseen => undef,
338
        flags => undef,
338
        flags => undef,
339
        updated_on => '2023-01-01 00:00:00'
339
    }
340
    }
340
});
341
});
341
t::lib::Mocks::mock_preference( 'TrackLastPatronActivity', '0' );
342
t::lib::Mocks::mock_preference( 'TrackLastPatronActivity', '0' );
342
Koha::Patrons->find( $patron2->{borrowernumber} )->track_login;
343
Koha::Patrons->find( $patron2->{borrowernumber} )->track_login;
343
is( Koha::Patrons->find( $patron2->{borrowernumber} )->lastseen, undef, 'Lastseen should not be changed' );
344
is( Koha::Patrons->find( $patron2->{borrowernumber} )->lastseen, undef, 'Lastseen should not be changed' );
345
is( Koha::Patrons->find( $patron2->{borrowernumber} )->updated_on, '2023-01-01 00:00:00', 'Updated_on should not be changed' );
344
Koha::Patrons->find( $patron2->{borrowernumber} )->track_login({ force => 1 });
346
Koha::Patrons->find( $patron2->{borrowernumber} )->track_login({ force => 1 });
345
isnt( Koha::Patrons->find( $patron2->{borrowernumber} )->lastseen, undef, 'Lastseen should be changed now' );
347
isnt( Koha::Patrons->find( $patron2->{borrowernumber} )->lastseen, undef, 'Lastseen should be changed now' );
348
is( Koha::Patrons->find( $patron2->{borrowernumber} )->updated_on, '2023-01-01 00:00:00', 'Updated_on should not be changed' );
346
349
347
# Test GetBorrowersToExpunge and regular patron with permission
350
# Test GetBorrowersToExpunge and regular patron with permission
348
$builder->build({
351
$builder->build({
349
- 

Return to bug 33997