diff options
author | lambda <lain@soykaf.club> | 2019-04-21 13:52:06 +0000 |
---|---|---|
committer | lambda <lain@soykaf.club> | 2019-04-21 13:52:06 +0000 |
commit | 5300cd56e55829e5f6ce471e4684a484baa1eb87 (patch) | |
tree | 21faf9de0c102ac55d040e9a00971d3d48c7e9ae /test/web/oauth/oauth_controller_test.exs | |
parent | ad157f16b2da999944b4161c46d69ca446405526 (diff) | |
parent | 9256d2d4b40bc3f48c9bb2d54f868dbc5c4c2f89 (diff) | |
download | pleroma-5300cd56e55829e5f6ce471e4684a484baa1eb87.tar.gz |
Merge branch '923_oauth_controller_refactoring_p2' into 'develop'
[#923] Refactored OAuthController#authorize
See merge request pleroma/pleroma!1080
Diffstat (limited to 'test/web/oauth/oauth_controller_test.exs')
-rw-r--r-- | test/web/oauth/oauth_controller_test.exs | 21 |
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) |