diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-01-11 12:15:42 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-01-11 12:15:42 +0300 |
commit | 1630ecaa20894c6e18b83ce1a830184d577150c3 (patch) | |
tree | 877c35b3441ca7431ead3d528ae07f1b8e36d62b /test/web/masto_fe_controller_test.exs | |
parent | 3453b27015dfa26bc6fd59899541eadfce2cacee (diff) | |
parent | 05ca420c0994b079116b40ea5a84214b50d56d0e (diff) | |
download | pleroma-1630ecaa20894c6e18b83ce1a830184d577150c3.tar.gz pleroma-1630ecaa20894c6e18b83ce1a830184d577150c3.zip |
Merge branch 'develop' into admin-be
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 |