summaryrefslogtreecommitdiff
path: root/test/web/masto_fe_controller_test.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-01-10 16:18:32 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-01-10 16:18:32 +0300
commit39ce894a07cc546092e9c3fcdedabd2b750524c0 (patch)
treecf36180e1effe3c90a40174e9510ab5cbffdba3f /test/web/masto_fe_controller_test.exs
parent6c94b7498b889ffe13691123c94bbe5440786852 (diff)
parent05ca420c0994b079116b40ea5a84214b50d56d0e (diff)
downloadpleroma-39ce894a07cc546092e9c3fcdedabd2b750524c0.tar.gz
pleroma-39ce894a07cc546092e9c3fcdedabd2b750524c0.zip
Merge remote-tracking branch 'remotes/origin/develop' into 1478-oauth-admin-scopes-tweaks
# Conflicts: # lib/pleroma/user.ex
Diffstat (limited to 'test/web/masto_fe_controller_test.exs')
-rw-r--r--test/web/masto_fe_controller_test.exs5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/web/masto_fe_controller_test.exs b/test/web/masto_fe_controller_test.exs
index b5dbd4a25..f9870a852 100644
--- a/test/web/masto_fe_controller_test.exs
+++ b/test/web/masto_fe_controller_test.exs
@@ -18,6 +18,7 @@ defmodule Pleroma.Web.MastodonAPI.MastoFEController do
conn =
conn
|> assign(:user, user)
+ |> assign(:token, insert(:oauth_token, user: user, scopes: ["write:accounts"]))
|> put("/api/web/settings", %{"data" => %{"programming" => "socks"}})
assert _result = json_response(conn, 200)
@@ -63,12 +64,12 @@ defmodule Pleroma.Web.MastodonAPI.MastoFEController do
end
test "does not redirect logged in users to the login page", %{conn: conn, path: path} do
- token = insert(:oauth_token)
+ token = insert(:oauth_token, scopes: ["read"])
conn =
conn
|> assign(:user, token.user)
- |> put_session(:oauth_token, token.token)
+ |> assign(:token, token)
|> get(path)
assert conn.status == 200