diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-03-18 20:30:31 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-03-18 20:30:31 +0300 |
commit | ec3719f5391d6f9945cec2e36287049d72743cd4 (patch) | |
tree | 6be0c45d7168d47491e4d49a4ad558e9cd335990 /test/plugs/user_is_admin_plug_test.exs | |
parent | 69341cbcbac2459faa43bb924577e84dac353982 (diff) | |
download | pleroma-ec3719f5391d6f9945cec2e36287049d72743cd4.tar.gz pleroma-ec3719f5391d6f9945cec2e36287049d72743cd4.zip |
Improved in-test config management functions.
Diffstat (limited to 'test/plugs/user_is_admin_plug_test.exs')
-rw-r--r-- | test/plugs/user_is_admin_plug_test.exs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/plugs/user_is_admin_plug_test.exs b/test/plugs/user_is_admin_plug_test.exs index 015d51018..1062d6e70 100644 --- a/test/plugs/user_is_admin_plug_test.exs +++ b/test/plugs/user_is_admin_plug_test.exs @@ -9,9 +9,7 @@ defmodule Pleroma.Plugs.UserIsAdminPlugTest do import Pleroma.Factory describe "unless [:auth, :enforce_oauth_admin_scope_usage]," do - clear_config([:auth, :enforce_oauth_admin_scope_usage]) do - Pleroma.Config.put([:auth, :enforce_oauth_admin_scope_usage], false) - end + clear_config([:auth, :enforce_oauth_admin_scope_usage], false) test "accepts a user that is an admin" do user = insert(:user, is_admin: true) @@ -42,9 +40,7 @@ defmodule Pleroma.Plugs.UserIsAdminPlugTest do end describe "with [:auth, :enforce_oauth_admin_scope_usage]," do - clear_config([:auth, :enforce_oauth_admin_scope_usage]) do - Pleroma.Config.put([:auth, :enforce_oauth_admin_scope_usage], true) - end + clear_config([:auth, :enforce_oauth_admin_scope_usage], true) setup do admin_user = insert(:user, is_admin: true) |