Improved in-test `clear_config/n` applicability (setup / setup_all / in-test usage).
[akkoma] / test / plugs / admin_secret_authentication_plug_test.exs
index e41ce1825043affb72e88e04ae1b3848c68594bd..100016c62842461e987b0c04f82efa71fe6a45a2 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Plugs.AdminSecretAuthenticationPlugTest do
@@ -23,7 +23,7 @@ defmodule Pleroma.Plugs.AdminSecretAuthenticationPlugTest do
   end
 
   describe "when secret set it assigns an admin user" do
-    clear_config([:admin_token])
+    setup do: clear_config([:admin_token])
 
     test "with `admin_token` query parameter", %{conn: conn} do
       Pleroma.Config.put(:admin_token, "password123")