Lines 31-37
use Module::Load::Conditional qw/check_install/;
Link Here
|
31 |
|
31 |
|
32 |
BEGIN { |
32 |
BEGIN { |
33 |
if ( check_install( module => 'Test::DBIx::Class' ) ) { |
33 |
if ( check_install( module => 'Test::DBIx::Class' ) ) { |
34 |
plan tests => 39; |
34 |
plan tests => 40; |
35 |
} else { |
35 |
} else { |
36 |
plan skip_all => "Need Test::DBIx::Class" |
36 |
plan skip_all => "Need Test::DBIx::Class" |
37 |
} |
37 |
} |
Lines 73-78
fixtures_ok [
Link Here
|
73 |
[ 'MPL', 1, 6, 2011, '', '', 0 ], |
73 |
[ 'MPL', 1, 6, 2011, '', '', 0 ], |
74 |
[ 'MPL', 4, 7, 2012, '', '', 0 ], |
74 |
[ 'MPL', 4, 7, 2012, '', '', 0 ], |
75 |
[ 'CPL', 6, 8, 2012, '', '', 0 ], |
75 |
[ 'CPL', 6, 8, 2012, '', '', 0 ], |
|
|
76 |
[ 'MPL', 7, 7, 2012, '', '', 1 ], # holiday exception |
77 |
[ 'MPL', 7, 7, 2012, '', '', 0 ], # holiday |
76 |
], |
78 |
], |
77 |
], "add fixtures"; |
79 |
], "add fixtures"; |
78 |
|
80 |
|
Lines 139-144
my $holiday_for_another_branch = DateTime->new(
Link Here
|
139 |
day => 6, # This is a monday |
141 |
day => 6, # This is a monday |
140 |
); |
142 |
); |
141 |
|
143 |
|
|
|
144 |
my $holiday_excepted = DateTime->new( |
145 |
year => 2012, |
146 |
month => 7, |
147 |
day => 7, # Both a holiday and exception |
148 |
); |
149 |
|
142 |
{ # Syspref-agnostic tests |
150 |
{ # Syspref-agnostic tests |
143 |
is ( $saturday->day_of_week, 6, '\'$saturday\' is actually a saturday (6th day of week)'); |
151 |
is ( $saturday->day_of_week, 6, '\'$saturday\' is actually a saturday (6th day of week)'); |
144 |
is ( $sunday->day_of_week, 7, '\'$sunday\' is actually a sunday (7th day of week)'); |
152 |
is ( $sunday->day_of_week, 7, '\'$sunday\' is actually a sunday (7th day of week)'); |
Lines 151-156
my $holiday_for_another_branch = DateTime->new(
Link Here
|
151 |
is ( $cal->is_holiday($notspecial), 0, 'Fixed single date that is not a holiday test' ); |
159 |
is ( $cal->is_holiday($notspecial), 0, 'Fixed single date that is not a holiday test' ); |
152 |
is ( $cal->is_holiday($sunday_exception), 0, 'Exception holiday is not a closed day test' ); |
160 |
is ( $cal->is_holiday($sunday_exception), 0, 'Exception holiday is not a closed day test' ); |
153 |
is ( $cal->is_holiday($holiday_for_another_branch), 0, 'Holiday defined for another branch should not be defined as an holiday' ); |
161 |
is ( $cal->is_holiday($holiday_for_another_branch), 0, 'Holiday defined for another branch should not be defined as an holiday' ); |
|
|
162 |
is ( $cal->is_holiday($holiday_excepted), 0, 'Holiday defined and excepted should not be a holiday' ); |
154 |
} |
163 |
} |
155 |
|
164 |
|
156 |
{ # Bugzilla #8966 - is_holiday truncates referenced date |
165 |
{ # Bugzilla #8966 - is_holiday truncates referenced date |
157 |
- |
|
|