|
Lines 349-357
is( scalar(@$patstodel),2,'Borrowers without issues deleted by last issue date')
Link Here
|
| 349 |
|
349 |
|
| 350 |
# Test GetBorrowersToExpunge and TrackLastPatronActivity |
350 |
# Test GetBorrowersToExpunge and TrackLastPatronActivity |
| 351 |
$dbh->do(q|UPDATE borrowers SET lastseen=NULL|); |
351 |
$dbh->do(q|UPDATE borrowers SET lastseen=NULL|); |
| 352 |
$builder->build({ source => 'Borrower', value => { lastseen => '2016-01-01 01:01:01', guarantorid => undef } } ); |
352 |
$builder->build({ source => 'Borrower', value => { lastseen => '2016-01-01 01:01:01', categorycode => 'CIVILIAN', guarantorid => undef } } ); |
| 353 |
$builder->build({ source => 'Borrower', value => { lastseen => '2016-02-02 02:02:02', guarantorid => undef } } ); |
353 |
$builder->build({ source => 'Borrower', value => { lastseen => '2016-02-02 02:02:02', categorycode => 'CIVILIAN', guarantorid => undef } } ); |
| 354 |
$builder->build({ source => 'Borrower', value => { lastseen => '2016-03-03 03:03:03', guarantorid => undef } } ); |
354 |
$builder->build({ source => 'Borrower', value => { lastseen => '2016-03-03 03:03:03', categorycode => 'CIVILIAN', guarantorid => undef } } ); |
| 355 |
$patstodel = GetBorrowersToExpunge( { last_seen => '1999-12-12' }); |
355 |
$patstodel = GetBorrowersToExpunge( { last_seen => '1999-12-12' }); |
| 356 |
is( scalar @$patstodel, 0, 'TrackLastPatronActivity - 0 patrons must be deleted' ); |
356 |
is( scalar @$patstodel, 0, 'TrackLastPatronActivity - 0 patrons must be deleted' ); |
| 357 |
$patstodel = GetBorrowersToExpunge( { last_seen => '2016-02-15' }); |
357 |
$patstodel = GetBorrowersToExpunge( { last_seen => '2016-02-15' }); |
| 358 |
- |
|
|