summaryrefslogtreecommitdiff
path: root/test/web/masto_fe_controller_test.exs
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-01-12 12:12:15 -0600
committerMark Felder <feld@FreeBSD.org>2020-01-12 12:12:15 -0600
commit2f5b8fbeb3830759c00675f99d893a92b1d3edb2 (patch)
treeee7ba90fa0b52e31cc7beeb9335deefbadd94e15 /test/web/masto_fe_controller_test.exs
parent933dc120438d14502e4bc4c29db904114fb6e438 (diff)
parentecb8fe183c5a007e80d7b2b1bfc9ead89dc27cc2 (diff)
downloadpleroma-2f5b8fbeb3830759c00675f99d893a92b1d3edb2.tar.gz
pleroma-2f5b8fbeb3830759c00675f99d893a92b1d3edb2.zip
Merge branch 'develop' into issue/1354
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