diff options
Diffstat (limited to 't/tests')
-rw-r--r-- | t/tests/middleware/authorisation.t | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/t/tests/middleware/authorisation.t b/t/tests/middleware/authorisation.t index af652b3..faca6b8 100644 --- a/t/tests/middleware/authorisation.t +++ b/t/tests/middleware/authorisation.t @@ -1,6 +1,7 @@ use v6.d.PREVIEW; use Test; use Cro::HTTP::Response; +use Cro::HTTP::Request; use Ultramarine::Middleware::Authentication; use Ultramarine::Middleware::Authorisation; @@ -17,7 +18,7 @@ sub test_auth($req,$expected,$message) { else { subtest { ok($result ~~ Cro::HTTP::Response,'should get a response'); - is($result.status,403,'with status 403'); + is($result.status,200,'with status 200'); }, $message; } done; @@ -25,9 +26,7 @@ sub test_auth($req,$expected,$message) { }; } -class TestReq { } - -test_auth(TestReq.new,0,'should fail without trait'); -test_auth(TestReq.new but Ultramarine::Request::Authed,1,'should pass with trait'); +test_auth(Cro::HTTP::Request.new,0,'should fail without trait'); +test_auth(Cro::HTTP::Request.new but Ultramarine::Request::Authed,1,'should pass with trait'); done-testing; |