diff options
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 7a91549f5..0c59b3ce8 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", "write", "follow"], 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 81618e935..b1a51e30e 100644 --- a/test/web/oauth/authorization_test.exs +++ b/test/web/oauth/authorization_test.exs @@ -13,7 +13,7 @@ defmodule Pleroma.Web.OAuth.AuthorizationTest do Repo.insert( App.register_changeset(%App{}, %{ client_name: "client", - scopes: "scope", + scopes: ["scope"], redirect_uris: "url" }) ) @@ -33,7 +33,7 @@ defmodule Pleroma.Web.OAuth.AuthorizationTest do Repo.insert( App.register_changeset(%App{}, %{ client_name: "client", - scopes: "scope", + scopes: ["scope"], redirect_uris: "url" }) ) @@ -66,7 +66,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 2315f9a34..ca1c04319 100644 --- a/test/web/oauth/oauth_controller_test.exs +++ b/test/web/oauth/oauth_controller_test.exs @@ -22,6 +22,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 4dab4a308..a708e4991 100644 --- a/test/web/oauth/token_test.exs +++ b/test/web/oauth/token_test.exs @@ -16,7 +16,7 @@ defmodule Pleroma.Web.OAuth.TokenTest do Repo.insert( App.register_changeset(%App{}, %{ client_name: "client", - scopes: "scope", + scopes: ["scope"], redirect_uris: "url" }) ) @@ -41,7 +41,7 @@ defmodule Pleroma.Web.OAuth.TokenTest do Repo.insert( App.register_changeset(%App{}, %{ client_name: "client1", - scopes: "scope", + scopes: ["scope"], redirect_uris: "url" }) ) @@ -50,7 +50,7 @@ defmodule Pleroma.Web.OAuth.TokenTest do Repo.insert( App.register_changeset(%App{}, %{ client_name: "client2", - scopes: "scope", + scopes: ["scope"], redirect_uris: "url" }) ) |