diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-04-02 15:41:30 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-04-02 15:41:30 +0700 |
commit | a1869f5272ddd83cdf2b2fc487668de79f2d0c6d (patch) | |
tree | def42bef14e8ced310471a194080e38cbee15452 /test/web/oauth/oauth_controller_test.exs | |
parent | 16e598ec11cb9178b9fc53a1ec4b649d97c5f3b8 (diff) | |
parent | f8aa917eef9280631a5cd2c95cf1db8fab6e14e5 (diff) | |
download | pleroma-a1869f5272ddd83cdf2b2fc487668de79f2d0c6d.tar.gz pleroma-a1869f5272ddd83cdf2b2fc487668de79f2d0c6d.zip |
Merge remote-tracking branch 'pleroma/develop' into remove-user-activities
Diffstat (limited to 'test/web/oauth/oauth_controller_test.exs')
-rw-r--r-- | test/web/oauth/oauth_controller_test.exs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/web/oauth/oauth_controller_test.exs b/test/web/oauth/oauth_controller_test.exs index ed94416ff..84ec7b4ee 100644 --- a/test/web/oauth/oauth_controller_test.exs +++ b/test/web/oauth/oauth_controller_test.exs @@ -87,7 +87,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do assert result =~ app.redirect_uris # Error message - assert result =~ "Permissions not specified" + assert result =~ "This action is outside the authorized scopes" end test "returns 401 for scopes beyond app scopes", %{conn: conn} do @@ -113,7 +113,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do assert result =~ app.redirect_uris # Error message - assert result =~ "Permissions not specified" + assert result =~ "This action is outside the authorized scopes" end test "issues a token for an all-body request" do @@ -132,11 +132,12 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do "client_secret" => app.client_secret }) - assert %{"access_token" => token} = json_response(conn, 200) + assert %{"access_token" => token, "me" => ap_id} = json_response(conn, 200) token = Repo.get_by(Token, token: token) assert token assert token.scopes == auth.scopes + assert user.ap_id == ap_id end test "issues a token for `password` grant_type with valid credentials, with full permissions by default" do |