diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-10-07 02:14:45 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2019-10-07 02:14:45 +0000 |
commit | b4f3c16885a489c40de82e5ef321caafa4b10c81 (patch) | |
tree | e81e3d7ba6882b31bd18c221f872049af73e44f2 /test/web/oauth/oauth_controller_test.exs | |
parent | 25cffffaf1685ef02cd318bdbd99bb325d295458 (diff) | |
parent | b93856874de673f1c05c557ad482d4480ca7e0a7 (diff) | |
download | pleroma-b4f3c16885a489c40de82e5ef321caafa4b10c81.tar.gz pleroma-b4f3c16885a489c40de82e5ef321caafa4b10c81.zip |
Merge branch '1234-mastodon-2-4-3-oauth-scopes' into 'develop'
[#1234] Mastodon 2.4.3 hierarchical OAuth scopes
Closes #1234
See merge request pleroma/pleroma!1643
Diffstat (limited to 'test/web/oauth/oauth_controller_test.exs')
-rw-r--r-- | test/web/oauth/oauth_controller_test.exs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/web/oauth/oauth_controller_test.exs b/test/web/oauth/oauth_controller_test.exs index 4d0741d14..41aaf6189 100644 --- a/test/web/oauth/oauth_controller_test.exs +++ b/test/web/oauth/oauth_controller_test.exs @@ -557,7 +557,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do "password" => "test", "client_id" => app.client_id, "redirect_uri" => redirect_uri, - "scope" => "read write", + "scope" => "read:subscope write", "state" => "statepassed" } }) @@ -570,7 +570,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do assert %{"state" => "statepassed", "code" => code} = query auth = Repo.get_by(Authorization, token: code) assert auth - assert auth.scopes == ["read", "write"] + assert auth.scopes == ["read:subscope", "write"] end test "returns 401 for wrong credentials", %{conn: conn} do @@ -627,7 +627,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do assert result =~ "This action is outside the authorized scopes" end - test "returns 401 for scopes beyond app scopes", %{conn: conn} do + test "returns 401 for scopes beyond app scopes hierarchy", %{conn: conn} do user = insert(:user) app = insert(:oauth_app, scopes: ["read", "write"]) redirect_uri = OAuthController.default_redirect_uri(app) |