summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2017-12-16 20:13:52 +0000
committerdakkar <dakkar@thenautilus.net>2017-12-16 20:13:52 +0000
commitaf29c81914a2d172944c00c0a6289e804f8a9988 (patch)
tree62ecedf32f34567b3109aa1490bec6562deb7ff4 /t
parentauthorisation middleware (diff)
downloadUltramarine-af29c81914a2d172944c00c0a6289e804f8a9988.tar.gz
Ultramarine-af29c81914a2d172944c00c0a6289e804f8a9988.tar.bz2
Ultramarine-af29c81914a2d172944c00c0a6289e804f8a9988.zip
fix authorisation to return Subsonic response
Diffstat (limited to 't')
-rw-r--r--t/tests/middleware/authorisation.t9
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;