aboutsummaryrefslogtreecommitdiff
path: root/test/web/oauth/oauth_controller_test.exs
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@gmail.com>2019-04-30 20:17:52 +0700
committerRoman Chvanikov <chvanikoff@gmail.com>2019-04-30 20:17:52 +0700
commit0f0cc2703b7ffb99c58e72782925ea4dd61db41d (patch)
treef640d180d16797a6da98a7d1e1cb7c6fb6350392 /test/web/oauth/oauth_controller_test.exs
parentb87ad13803df59d88feb736c3d0ff9cf514989d7 (diff)
parent32a4501d2d1cdfef68cbde236482e0c84cce3a7a (diff)
downloadpleroma-0f0cc2703b7ffb99c58e72782925ea4dd61db41d.tar.gz
Merge develop
Diffstat (limited to 'test/web/oauth/oauth_controller_test.exs')
-rw-r--r--test/web/oauth/oauth_controller_test.exs21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/web/oauth/oauth_controller_test.exs b/test/web/oauth/oauth_controller_test.exs
index fb505fab3..6e96537ec 100644
--- a/test/web/oauth/oauth_controller_test.exs
+++ b/test/web/oauth/oauth_controller_test.exs
@@ -365,6 +365,27 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
assert html_response(conn, 200) =~ ~s(type="submit")
end
+ test "properly handles internal calls with `authorization`-wrapped params", %{
+ app: app,
+ conn: conn
+ } do
+ conn =
+ get(
+ conn,
+ "/oauth/authorize",
+ %{
+ "authorization" => %{
+ "response_type" => "code",
+ "client_id" => app.client_id,
+ "redirect_uri" => app.redirect_uris,
+ "scope" => "read"
+ }
+ }
+ )
+
+ assert html_response(conn, 200) =~ ~s(type="submit")
+ end
+
test "renders authentication page if user is already authenticated but `force_login` is tru-ish",
%{app: app, conn: conn} do
token = insert(:oauth_token, app_id: app.id)