Lines 1102-1115
subtest "filter_by_last_update" => sub {
Link Here
|
1102 |
is( $count, 3, '3 patrons have been updated before the last 2 days (exclusive)' ); |
1102 |
is( $count, 3, '3 patrons have been updated before the last 2 days (exclusive)' ); |
1103 |
|
1103 |
|
1104 |
$count = $patrons->filter_by_last_update( |
1104 |
$count = $patrons->filter_by_last_update( |
|
|
1105 |
{ timestamp_column_name => 'updated_on', days => 2, days_inclusive => 1 } )->count; |
1106 |
is( $count, 4, '4 patrons have been updated before the last 2 days (inclusive)' ); |
1107 |
|
1108 |
$count = $patrons->filter_by_last_update( |
1105 |
{ timestamp_column_name => 'updated_on', days => 1 } )->count; |
1109 |
{ timestamp_column_name => 'updated_on', days => 1 } )->count; |
1106 |
is( $count, 4, '4 patrons have been updated before yesterday (exclusive)' ); |
1110 |
is( $count, 4, '4 patrons have been updated before yesterday (exclusive)' ); |
1107 |
|
1111 |
|
1108 |
$count = $patrons->filter_by_last_update( |
1112 |
$count = $patrons->filter_by_last_update( |
|
|
1113 |
{ timestamp_column_name => 'updated_on', days => 1, days_inclusive => 1 } )->count; |
1114 |
is( $count, 5, '5 patrons have been updated before yesterday (inclusive)' ); |
1115 |
|
1116 |
$count = $patrons->filter_by_last_update( |
1109 |
{ timestamp_column_name => 'updated_on', days => 0 } )->count; |
1117 |
{ timestamp_column_name => 'updated_on', days => 0 } )->count; |
1110 |
is( $count, 5, '5 patrons have been updated before today (exclusive)' ); |
1118 |
is( $count, 5, '5 patrons have been updated before today (exclusive)' ); |
1111 |
|
1119 |
|
1112 |
$count = $patrons->filter_by_last_update( |
1120 |
$count = $patrons->filter_by_last_update( |
|
|
1121 |
{ timestamp_column_name => 'updated_on', days => 0, days_inclusive => 1 } )->count; |
1122 |
is( $count, 6, '6 patrons have been updated before today (inclusive)' ); |
1123 |
|
1124 |
$count = $patrons->filter_by_last_update( |
1113 |
{ timestamp_column_name => 'updated_on', from => $now } )->count; |
1125 |
{ timestamp_column_name => 'updated_on', from => $now } )->count; |
1114 |
is( $count, 1, '1 patron has been updated "from today" (inclusive)' ); |
1126 |
is( $count, 1, '1 patron has been updated "from today" (inclusive)' ); |
1115 |
|
1127 |
|
1116 |
- |
|
|