summaryrefslogtreecommitdiff
path: root/test/web/masto_fe_controller_test.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-01-30 22:16:55 +0300
committerrinpatch <rinpatch@sdf.org>2020-01-30 22:16:55 +0300
commit5b62acf6e9a38f8d14a9fb37cc85e646fb0169e3 (patch)
tree6677ba80418ffd34a78cba75498f2c1ab48ba14c /test/web/masto_fe_controller_test.exs
parent45180d4c6058f790475d8ff28018c912db105082 (diff)
parent946de2299cccebac6718e3a132397ff5c06c67ee (diff)
downloadpleroma-5b62acf6e9a38f8d14a9fb37cc85e646fb0169e3.tar.gz
pleroma-5b62acf6e9a38f8d14a9fb37cc85e646fb0169e3.zip
Merge branch 'develop' into fix/disable-rate-limiter-for-socket-localhost
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