Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags...
[akkoma] / test / pleroma / web / plugs / o_auth_scopes_plug_test.exs
index 6a7676c8a527571d44facf0f6f62ba5513880844..7241b0afd5b6a4734f13f96eea91a3a221a18d0c 100644 (file)
@@ -1,12 +1,12 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.Plugs.OAuthScopesPlugTest do
   use Pleroma.Web.ConnCase
 
-  alias Pleroma.Plugs.OAuthScopesPlug
   alias Pleroma.Repo
+  alias Pleroma.Web.Plugs.OAuthScopesPlug
 
   import Mock
   import Pleroma.Factory
@@ -181,7 +181,7 @@ defmodule Pleroma.Web.Plugs.OAuthScopesPlugTest do
            "and [optionally] keeps only prefixed scopes, " <>
            "depending on `[:auth, :enforce_oauth_admin_scope_usage]` setting",
          %{f: f} do
-      Pleroma.Config.put([:auth, :enforce_oauth_admin_scope_usage], false)
+      clear_config([:auth, :enforce_oauth_admin_scope_usage], false)
 
       assert f.(["read"], %{admin: true}) == ["admin:read", "read"]
 
@@ -192,7 +192,7 @@ defmodule Pleroma.Web.Plugs.OAuthScopesPlugTest do
                "write"
              ]
 
-      Pleroma.Config.put([:auth, :enforce_oauth_admin_scope_usage], true)
+      clear_config([:auth, :enforce_oauth_admin_scope_usage], true)
 
       assert f.(["read:accounts"], %{admin: true}) == ["admin:read:accounts"]