diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-02-14 00:29:29 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-02-14 00:29:29 +0300 |
commit | 063baca5e4f3a100c0d45dffb14e4968599ef43b (patch) | |
tree | 007c44ff7cd2c90b2e1c18d7ced704448fea5601 /test/web/oauth | |
parent | a337bd114c3cbbb8e8270ec56a012e82f84df808 (diff) | |
download | pleroma-063baca5e4f3a100c0d45dffb14e4968599ef43b.tar.gz pleroma-063baca5e4f3a100c0d45dffb14e4968599ef43b.zip |
[#468] User UI for OAuth permissions restriction. Standardized storage format for `scopes` fields, updated usages.
Diffstat (limited to 'test/web/oauth')
-rw-r--r-- | test/web/oauth/authorization_test.exs | 6 | ||||
-rw-r--r-- | test/web/oauth/oauth_controller_test.exs | 1 | ||||
-rw-r--r-- | test/web/oauth/token_test.exs | 6 |
3 files changed, 7 insertions, 6 deletions
diff --git a/test/web/oauth/authorization_test.exs b/test/web/oauth/authorization_test.exs index 3b1ddada8..68db1ceb0 100644 --- a/test/web/oauth/authorization_test.exs +++ b/test/web/oauth/authorization_test.exs @@ -12,7 +12,7 @@ defmodule Pleroma.Web.OAuth.AuthorizationTest do Repo.insert( App.register_changeset(%App{}, %{ client_name: "client", - scopes: "scope", + scopes: ["scope"], redirect_uris: "url" }) ) @@ -32,7 +32,7 @@ defmodule Pleroma.Web.OAuth.AuthorizationTest do Repo.insert( App.register_changeset(%App{}, %{ client_name: "client", - scopes: "scope", + scopes: ["scope"], redirect_uris: "url" }) ) @@ -65,7 +65,7 @@ defmodule Pleroma.Web.OAuth.AuthorizationTest do Repo.insert( App.register_changeset(%App{}, %{ client_name: "client", - scopes: "scope", + scopes: ["scope"], redirect_uris: "url" }) ) diff --git a/test/web/oauth/oauth_controller_test.exs b/test/web/oauth/oauth_controller_test.exs index e0d3cb55f..74d512c7f 100644 --- a/test/web/oauth/oauth_controller_test.exs +++ b/test/web/oauth/oauth_controller_test.exs @@ -21,6 +21,7 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do "password" => "test", "client_id" => app.client_id, "redirect_uri" => app.redirect_uris, + "scope" => Enum.join(app.scopes, " "), "state" => "statepassed" } }) diff --git a/test/web/oauth/token_test.exs b/test/web/oauth/token_test.exs index 9a241d61a..63a7eb3ae 100644 --- a/test/web/oauth/token_test.exs +++ b/test/web/oauth/token_test.exs @@ -14,7 +14,7 @@ defmodule Pleroma.Web.OAuth.TokenTest do Repo.insert( App.register_changeset(%App{}, %{ client_name: "client", - scopes: "scope", + scopes: ["scope"], redirect_uris: "url" }) ) @@ -39,7 +39,7 @@ defmodule Pleroma.Web.OAuth.TokenTest do Repo.insert( App.register_changeset(%App{}, %{ client_name: "client1", - scopes: "scope", + scopes: ["scope"], redirect_uris: "url" }) ) @@ -48,7 +48,7 @@ defmodule Pleroma.Web.OAuth.TokenTest do Repo.insert( App.register_changeset(%App{}, %{ client_name: "client2", - scopes: "scope", + scopes: ["scope"], redirect_uris: "url" }) ) |