diff options
| author | lain <lain@soykaf.club> | 2020-01-10 13:07:20 +0000 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-01-10 13:07:20 +0000 |
| commit | 9b5cd8b1b71f009171fbce3cb9d5af37df68a051 (patch) | |
| tree | d2ebe56221c84517f50e6868394a994e1e757acc /test/web/masto_fe_controller_test.exs | |
| parent | e118d639a02166a2e04dd0ba7dbc38ba5d21984e (diff) | |
| parent | badd0a96eaa9ff8fca7d25eccd05e8428e132699 (diff) | |
| download | pleroma-9b5cd8b1b71f009171fbce3cb9d5af37df68a051.tar.gz pleroma-9b5cd8b1b71f009171fbce3cb9d5af37df68a051.zip | |
Merge branch 'oauth-scopes-tweaks-and-tests' into 'develop'
OAuth tweaks and tests rework
See merge request pleroma/pleroma!2068
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 |
