Advertisement
happy-barney

Test:AAA

Feb 11th, 2022
1,448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.47 KB | None | 0 0
  1. act { GET "/endpoint" };
  2.  
  3. subtest "guess has no access" => sub {
  4.   arrange { authenticated_user => guest };
  5.  
  6.   assume "has no access"
  7.     => expect { http_response_status FORBIDDEN }
  8.     => expect { http_response_content_type "text/javascript" }
  9.     ;
  10.  
  11.   assume "with uri parameter it redirects"
  12.     => arrange { http_request_uri_parameter signin => 1 }
  13.     => expect { http_response_status REDIRECT }
  14.     => expect { http_response_redirect_uri "/signin" }
  15.     ;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement