Handle 404 stuff better for thread.by_id
This commit is contained in:
parent
bda544feda
commit
061ee919a7
|
@ -62,8 +62,9 @@ sub by_id($self) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$self->stash(
|
$self->stash(
|
||||||
thread => [],
|
thread => {},
|
||||||
status => 404
|
remarks => [],
|
||||||
|
status => 404
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,9 @@ subtest 'View single thread', sub {
|
||||||
|
|
||||||
$t->get_ok('/thread/single/1/1')->status_is(200)
|
$t->get_ok('/thread/single/1/1')->status_is(200)
|
||||||
->text_like(h2 => qr/Thread #1/);
|
->text_like(h2 => qr/Thread #1/);
|
||||||
|
|
||||||
|
$t->get_ok('/thread/single/65536')->status_is(404)
|
||||||
|
->text_like(h2 => qr/Thread #/);
|
||||||
};
|
};
|
||||||
|
|
||||||
subtest 'Threads feed', sub {
|
subtest 'Threads feed', sub {
|
||||||
|
|
Loading…
Reference in a new issue