summaryrefslogtreecommitdiff
path: root/test/web/oauth/oauth_controller_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-10-07 12:30:59 +0200
committerlain <lain@soykaf.club>2019-10-07 12:30:59 +0200
commit73b6512907d205d4be49864541eeb941d259aa57 (patch)
tree8441ec250a7e7681b12bdc756df46a9870793149 /test/web/oauth/oauth_controller_test.exs
parent91e90aa807c2ce346cd453201447806fb71b21fe (diff)
parent93bdc55306895dce0554e7838ecf2ea7ddaea3a7 (diff)
downloadpleroma-73b6512907d205d4be49864541eeb941d259aa57.tar.gz
pleroma-73b6512907d205d4be49864541eeb941d259aa57.zip
Merge remote-tracking branch 'origin/develop' into reactions
Diffstat (limited to 'test/web/oauth/oauth_controller_test.exs')
-rw-r--r--test/web/oauth/oauth_controller_test.exs6
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)