Fix unknown client handling and replace client info API (fixes #181)
Change-Id: I074f6b8f2b72807b635fa900da3d6a9bd9a3afe1
diff --git a/t/plugin/auth-oauth.t b/t/plugin/auth-oauth.t
index 63c1df2..b07645e 100644
--- a/t/plugin/auth-oauth.t
+++ b/t/plugin/auth-oauth.t
@@ -772,6 +772,16 @@
->text_is('div.notify-error', 'Some fields are invalid')
;
+# OAuth client authorization flow
+$t->get_ok(Mojo::URL->new('/settings/oauth/authorize?client_id=abc'))
+ ->status_is(302)
+ ->header_is('location','/settings/oauth')
+ ;
+
+$t->get_ok('/settings/oauth/')
+ ->text_is('div.notify-error', 'Unknown client with abc.')
+ ;
+
# Logout
$t->get_ok('/x/expired-with-wrong-refresh');