Skip to content

Commit

Permalink
Add a proper not found page
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 25, 2024
1 parent 4f6df46 commit 80d9794
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions t/login.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ $config->{openid} = {
my $t = Test::Mojo->new(Cavil => $config);
$cavil_test->no_fixtures($t->app);

subtest 'Unknown resource' => sub {
$t->get_ok('/does_not_exist')->status_is(404)->content_like(qr/The requested resource does not exist/);
};

subtest 'Not authenticated' => sub {
$t->post_ok('/reviews/review_package/1')->status_is(403)->content_like(qr/Permission/);
$t->post_ok('/reviews/fasttrack_package/1')->status_is(403)->content_like(qr/Permission/);
Expand Down
3 changes: 3 additions & 0 deletions templates/not_found.html.ep
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
% layout 'default', title => 'Not found';

The requested resource does not exist.

0 comments on commit 80d9794

Please sign in to comment.