From af29c81914a2d172944c00c0a6289e804f8a9988 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 16 Dec 2017 20:13:52 +0000 Subject: fix authorisation to return Subsonic response --- t/tests/middleware/authorisation.t | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 't') 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; -- cgit v1.2.3