aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/integration/mastodon_websocket_test.exs2
-rw-r--r--test/support/factory.ex2
-rw-r--r--test/web/oauth/authorization_test.exs6
-rw-r--r--test/web/oauth/oauth_controller_test.exs1
-rw-r--r--test/web/oauth/token_test.exs6
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"
})
)