There may be no topics for a given timestamp range,
so don't attempt to treat `undef' as an arrayref.
sub dump_topics {
my ($ctx) = @_;
my $order = delete $ctx->{order}; # [ ds, subj1, subj2, subj3, ... ]
- if (!@$order) {
+ unless ($order) {
$ctx->{-html_tip} = '<pre>[No topics in range]</pre>';
return 404;
}
is($old->content, 'old', 'got expected old content');
is($new->content, 'new', 'got expected new content');
}
+ $res = $cb->(GET('/v2test/?t=1970'.'01'.'01'.'000000'));
+ is($res->code, 404, '404 for out-of-range t= param');
});
done_testing();