Lines 71-77
subtest '->is_expired' => sub {
Link Here
|
71 |
|
71 |
|
72 |
my $today = dt_from_string; |
72 |
my $today = dt_from_string; |
73 |
my $yesterday = dt_from_string->add( days => -1 ); |
73 |
my $yesterday = dt_from_string->add( days => -1 ); |
74 |
my $tommorow = dt_from_string->add( days => 1 ); |
74 |
my $tomorrow = dt_from_string->add( days => 1 ); |
75 |
my $new_today = $builder->build_object({ |
75 |
my $new_today = $builder->build_object({ |
76 |
class => 'Koha::News', |
76 |
class => 'Koha::News', |
77 |
value => { |
77 |
value => { |
Lines 87-93
subtest '->is_expired' => sub {
Link Here
|
87 |
my $new_not_expired = $builder->build_object({ |
87 |
my $new_not_expired = $builder->build_object({ |
88 |
class => 'Koha::News', |
88 |
class => 'Koha::News', |
89 |
value => { |
89 |
value => { |
90 |
expirationdate => $tommorow, |
90 |
expirationdate => $tomorrow, |
91 |
} |
91 |
} |
92 |
}); |
92 |
}); |
93 |
|
93 |
|
Lines 151-157
subtest '->search_for_display' => sub {
Link Here
|
151 |
|
151 |
|
152 |
my $today = dt_from_string; |
152 |
my $today = dt_from_string; |
153 |
my $yesterday = dt_from_string->add( days => -1 ); |
153 |
my $yesterday = dt_from_string->add( days => -1 ); |
154 |
my $tommorow = dt_from_string->add( days => 1 ); |
154 |
my $tomorrow = dt_from_string->add( days => 1 ); |
155 |
my $library1 = $builder->build_object({ class => 'Koha::Libraries' }); |
155 |
my $library1 = $builder->build_object({ class => 'Koha::Libraries' }); |
156 |
my $library2 = $builder->build_object({ class => 'Koha::Libraries' }); |
156 |
my $library2 = $builder->build_object({ class => 'Koha::Libraries' }); |
157 |
|
157 |
|
Lines 168-174
subtest '->search_for_display' => sub {
Link Here
|
168 |
my $new_not_expired = $builder->build_object({ |
168 |
my $new_not_expired = $builder->build_object({ |
169 |
class => 'Koha::News', |
169 |
class => 'Koha::News', |
170 |
value => { |
170 |
value => { |
171 |
expirationdate => $tommorow, |
171 |
expirationdate => $tomorrow, |
172 |
timestamp => $today, |
172 |
timestamp => $today, |
173 |
lang => '', |
173 |
lang => '', |
174 |
branchcode => undef, |
174 |
branchcode => undef, |
Lines 178-185
subtest '->search_for_display' => sub {
Link Here
|
178 |
my $new_not_active = $builder->build_object({ |
178 |
my $new_not_active = $builder->build_object({ |
179 |
class => 'Koha::News', |
179 |
class => 'Koha::News', |
180 |
value => { |
180 |
value => { |
181 |
expirationdate => $tommorow, |
181 |
expirationdate => $tomorrow, |
182 |
timestamp => $tommorow, |
182 |
timestamp => $tomorrow, |
183 |
lang => '', |
183 |
lang => '', |
184 |
branchcode => undef, |
184 |
branchcode => undef, |
185 |
number => 3, |
185 |
number => 3, |
Lines 188-194
subtest '->search_for_display' => sub {
Link Here
|
188 |
my $new_slip= $builder->build_object({ |
188 |
my $new_slip= $builder->build_object({ |
189 |
class => 'Koha::News', |
189 |
class => 'Koha::News', |
190 |
value => { |
190 |
value => { |
191 |
expirationdate => $tommorow, |
191 |
expirationdate => $tomorrow, |
192 |
timestamp => $today, |
192 |
timestamp => $today, |
193 |
lang => 'slip', |
193 |
lang => 'slip', |
194 |
branchcode => $library1->branchcode, |
194 |
branchcode => $library1->branchcode, |
Lines 198-204
subtest '->search_for_display' => sub {
Link Here
|
198 |
my $new_intra = $builder->build_object({ |
198 |
my $new_intra = $builder->build_object({ |
199 |
class => 'Koha::News', |
199 |
class => 'Koha::News', |
200 |
value => { |
200 |
value => { |
201 |
expirationdate => $tommorow, |
201 |
expirationdate => $tomorrow, |
202 |
timestamp => $today, |
202 |
timestamp => $today, |
203 |
lang => 'koha', |
203 |
lang => 'koha', |
204 |
branchcode => $library2->branchcode, |
204 |
branchcode => $library2->branchcode, |
Lines 208-214
subtest '->search_for_display' => sub {
Link Here
|
208 |
my $new_intra2 = $builder->build_object({ |
208 |
my $new_intra2 = $builder->build_object({ |
209 |
class => 'Koha::News', |
209 |
class => 'Koha::News', |
210 |
value => { |
210 |
value => { |
211 |
expirationdate => $tommorow, |
211 |
expirationdate => $tomorrow, |
212 |
timestamp => $today, |
212 |
timestamp => $today, |
213 |
lang => 'koha', |
213 |
lang => 'koha', |
214 |
branchcode => undef, |
214 |
branchcode => undef, |
215 |
- |
|
|