diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-12-19 17:23:27 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-12-19 17:23:27 +0300 |
commit | 455e072d27f28c39050b2dc24b346a8f2ef30f90 (patch) | |
tree | 37906a1131bf70777316e24af19382f053f8c0c1 /test/support | |
parent | 7973cbdb9fa9120306cb5a265a477eeccd315ee6 (diff) | |
download | pleroma-455e072d27f28c39050b2dc24b346a8f2ef30f90.tar.gz pleroma-455e072d27f28c39050b2dc24b346a8f2ef30f90.zip |
[#2068] Introduced proper OAuth tokens usage to controller tests.
Diffstat (limited to 'test/support')
-rw-r--r-- | test/support/conn_case.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex index 95bc2492a..22e72fc09 100644 --- a/test/support/conn_case.ex +++ b/test/support/conn_case.ex @@ -30,14 +30,14 @@ defmodule Pleroma.Web.ConnCase do @endpoint Pleroma.Web.Endpoint # Sets up OAuth access with specified scopes - defp oauth_access(scopes, opts \\ %{}) do + defp oauth_access(scopes, opts \\ []) do user = - Map.get_lazy(opts, :user, fn -> + Keyword.get_lazy(opts, :user, fn -> Pleroma.Factory.insert(:user) end) token = - Map.get_lazy(opts, :oauth_token, fn -> + Keyword.get_lazy(opts, :oauth_token, fn -> Pleroma.Factory.insert(:oauth_token, user: user, scopes: scopes) end) |