diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2020-01-14 16:26:56 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-01-14 21:29:14 +0300 |
commit | c9f45edeac2cc3ed262bb4b30dc7e1120c6fa047 (patch) | |
tree | 3ba35681409d9c5dd9ca4d355ff39d4dd67448d4 /test/web/masto_fe_controller_test.exs | |
parent | 969769730e0b7578ddc6a5cd02f9b24eff5902a0 (diff) | |
parent | 12b28c8925c2c55e0d7bb66ff3320532a1aade3b (diff) | |
download | pleroma-c9f45edeac2cc3ed262bb4b30dc7e1120c6fa047.tar.gz pleroma-c9f45edeac2cc3ed262bb4b30dc7e1120c6fa047.zip |
Merge branch 'develop' into feature/tag_feed
Diffstat (limited to 'test/web/masto_fe_controller_test.exs')
-rw-r--r-- | test/web/masto_fe_controller_test.exs | 5 |
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 |