|
Lines 289-295
subtest 'with a library that is never open' => sub {
Link Here
|
| 289 |
$calendar->insert_week_day_holiday( weekday => $weekday, title => '', description => '' ); |
289 |
$calendar->insert_week_day_holiday( weekday => $weekday, title => '', description => '' ); |
| 290 |
} |
290 |
} |
| 291 |
|
291 |
|
| 292 |
my $now = DateTime->now; |
292 |
my $now = dt_from_string; |
| 293 |
|
293 |
|
| 294 |
subtest 'next_open_days should throw an exception' => sub { |
294 |
subtest 'next_open_days should throw an exception' => sub { |
| 295 |
my $kcalendar = Koha::Calendar->new( branchcode => $branchcode, days_mode => 'Calendar' ); |
295 |
my $kcalendar = Koha::Calendar->new( branchcode => $branchcode, days_mode => 'Calendar' ); |
|
Lines 315-321
subtest 'with a library that is *almost* never open' => sub {
Link Here
|
| 315 |
$calendar->insert_week_day_holiday( weekday => $weekday, title => '', description => '' ); |
315 |
$calendar->insert_week_day_holiday( weekday => $weekday, title => '', description => '' ); |
| 316 |
} |
316 |
} |
| 317 |
|
317 |
|
| 318 |
my $now = DateTime->now; |
318 |
my $now = dt_from_string; |
| 319 |
my $open_day_in_the_future = $now->clone()->add( years => 1 ); |
319 |
my $open_day_in_the_future = $now->clone()->add( years => 1 ); |
| 320 |
my $open_day_in_the_past = $now->clone()->subtract( years => 1 ); |
320 |
my $open_day_in_the_past = $now->clone()->subtract( years => 1 ); |
| 321 |
$calendar->insert_exception_holiday( date => $open_day_in_the_future->ymd, title => '', description => '' ); |
321 |
$calendar->insert_exception_holiday( date => $open_day_in_the_future->ymd, title => '', description => '' ); |
| 322 |
- |
|
|