|
Lines 145-152
EOS
Link Here
|
| 145 |
}; |
145 |
}; |
| 146 |
|
146 |
|
| 147 |
subtest 'Daily loans' => sub { |
147 |
subtest 'Daily loans' => sub { |
| 148 |
plan tests => 2; |
148 |
if ( $today->hour == 23 and $today->minute == 59 ) { |
| 149 |
skip "It's 23:59!", 2 if $today->hour == 23 and $today->minute == 59; |
149 |
plan skip_all => "It's 23:59!"; |
|
|
150 |
} else { |
| 151 |
plan tests => 2; |
| 152 |
} |
| 150 |
# Test 1: No overdue |
153 |
# Test 1: No overdue |
| 151 |
my $today_daily = $today->clone->set( hour => 23, minute => 59 ); |
154 |
my $today_daily = $today->clone->set( hour => 23, minute => 59 ); |
| 152 |
my $today_daily_as_formatted = output_pref( $today_daily ); |
155 |
my $today_daily_as_formatted = output_pref( $today_daily ); |
|
Lines 219-226
EOS
Link Here
|
| 219 |
}; |
222 |
}; |
| 220 |
|
223 |
|
| 221 |
subtest 'Hourly loans' => sub { |
224 |
subtest 'Hourly loans' => sub { |
| 222 |
plan tests => 2; |
225 |
if ( $today->hour == 23 and $today->minute == 59 ) { |
| 223 |
skip "It's 23:59!", 2 if $today->hour == 23 and $today->minute == 59; |
226 |
plan skip_all => "It's 23:59!"; |
|
|
227 |
} else { |
| 228 |
plan tests => 2; |
| 229 |
} |
| 224 |
# Test 1: No overdue |
230 |
# Test 1: No overdue |
| 225 |
my ( $date_due_in_time, $date_due_in_time_as_formatted, $date_due_in_late, $date_due_in_late_as_formatted, $issue_date, $slip, $expected_slip ); |
231 |
my ( $date_due_in_time, $date_due_in_time_as_formatted, $date_due_in_late, $date_due_in_late_as_formatted, $issue_date, $slip, $expected_slip ); |
| 226 |
# Assuming today is not hour = 23 and minute = 59 |
232 |
# Assuming today is not hour = 23 and minute = 59 |
|
Lines 307-314
EOS
Link Here
|
| 307 |
}; |
313 |
}; |
| 308 |
|
314 |
|
| 309 |
subtest 'Daily loans' => sub { |
315 |
subtest 'Daily loans' => sub { |
| 310 |
plan tests => 2; |
316 |
if ( $today->hour == 23 and $today->minute == 59 ) { |
| 311 |
skip "It's 23:59!", 2 if $today->hour == 23 and $today->minute == 59; |
317 |
plan skip_all => "It's 23:59!"; |
|
|
318 |
} else { |
| 319 |
plan tests => 2; |
| 320 |
} |
| 312 |
# Test 1: No overdue |
321 |
# Test 1: No overdue |
| 313 |
my $today_daily = $today->clone->set( hour => 23, minute => 59 ); |
322 |
my $today_daily = $today->clone->set( hour => 23, minute => 59 ); |
| 314 |
my $today_daily_as_formatted = output_pref( $today_daily ); |
323 |
my $today_daily_as_formatted = output_pref( $today_daily ); |
| 315 |
- |
|
|