New tests for 404 for hidden posts
This commit is contained in:
parent
5d4d938e2b
commit
1e3add3be2
|
@ -8,7 +8,7 @@ sub by_id($self) {
|
|||
|
||||
$self->stash(remark => $remark);
|
||||
|
||||
$self->stash(error => 'Remark not found 🤷')
|
||||
$self->stash(status => 404, error => 'Remark not found 🤷')
|
||||
unless keys %{$remark};
|
||||
|
||||
$self->render;
|
||||
|
|
|
@ -50,6 +50,12 @@ subtest Login => sub {
|
|||
$t->get_ok('/moderator/thread/hide/1')
|
||||
->status_is(302)
|
||||
->header_like(Location => qr{moderator/flagged});
|
||||
$t->get_ok('/moderator/thread/single/1')
|
||||
->status_is(200)
|
||||
->text_like(h2 => qr/Thread #/);
|
||||
$t->get_ok('/thread/single/1')
|
||||
->status_is(404)
|
||||
->text_like(p => qr/Thread not found/);
|
||||
$t->get_ok('/moderator/thread/unhide/1')
|
||||
->status_is(302)
|
||||
->header_like(Location => qr{moderator/hidden});
|
||||
|
@ -57,6 +63,12 @@ subtest Login => sub {
|
|||
$t->get_ok('/moderator/remark/hide/1')
|
||||
->status_is(302)
|
||||
->header_like(Location => qr{moderator/flagged});
|
||||
$t->get_ok('/moderator/remark/single/1')
|
||||
->status_is(200)
|
||||
->text_like(h2 => qr/Remark #/);
|
||||
$t->get_ok('/remark/single/1')
|
||||
->status_is(404)
|
||||
->text_like(p => qr/Remark not found/);
|
||||
$t->get_ok('/moderator/remark/unhide/1')
|
||||
->status_is(302)
|
||||
->header_like(Location => qr{moderator/hidden});
|
||||
|
|
Loading…
Reference in a new issue