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 | |
| 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')
| -rw-r--r-- | test/integration/mastodon_websocket_test.exs | 2 | ||||
| -rw-r--r-- | test/support/factory.ex | 2 | ||||
| -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 | 
5 files changed, 9 insertions, 8 deletions
| diff --git a/test/integration/mastodon_websocket_test.exs b/test/integration/mastodon_websocket_test.exs index 2e385f5ad..0c513b6e7 100644 --- a/test/integration/mastodon_websocket_test.exs +++ b/test/integration/mastodon_websocket_test.exs @@ -80,7 +80,7 @@ defmodule Pleroma.Integration.MastodonWebsocketTest do          Pleroma.Repo.insert(            OAuth.App.register_changeset(%OAuth.App{}, %{              client_name: "client", -            scopes: "scope", +            scopes: ["scope"],              redirect_uris: "url"            })          ) diff --git a/test/support/factory.ex b/test/support/factory.ex index 0c21093ce..eaa6f0ce2 100644 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@ -214,7 +214,7 @@ defmodule Pleroma.Factory do      %Pleroma.Web.OAuth.App{        client_name: "Some client",        redirect_uris: "https://example.com/callback", -      scopes: "read", +      scopes: ["read"],        website: "https://example.com",        client_id: "aaabbb==",        client_secret: "aaa;/&bbb" 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"          })        ) | 
