Skip to content

Commit

Permalink
Test main menu
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 14, 2024
1 parent 303600a commit 97d93e2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions t/login.t
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ subtest 'Unknown resource' => sub {
$t->get_ok('/does_not_exist')->status_is(404)->content_like(qr/The requested resource does not exist/);
};

subtest 'Public (main menu)' => sub {
$t->get_ok('/')->status_is(200);
$t->get_ok('/reviews/recent')->status_is(200);
$t->get_ok('/snippets')->status_is(200);
$t->get_ok('/licenses')->status_is(200);
$t->get_ok('/products')->status_is(200);
$t->get_ok('/products/openSUSE:Factory')->status_is(200);
};

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 All @@ -50,6 +59,7 @@ subtest 'Not authenticated' => sub {
$t->post_ok('/licenses/update_pattern/1')->status_is(403)->content_like(qr/Permission/);
$t->post_ok('/licenses/update_patterns')->status_is(403)->content_like(qr/Permission/);
$t->delete_ok('/licenses/remove_pattern/1')->status_is(403)->content_like(qr/Permission/);
$t->get_ok('/upload')->status_is(403)->content_like(qr/Permission/);
};

subtest 'OpenID' => sub {
Expand Down

0 comments on commit 97d93e2

Please sign in to comment.