Small wrapper module around Application.get_env/put_env
[akkoma] / test / web / activity_pub / activity_pub_controller_test.exs
index f22975f861979355051554857629df5a9a931328..1c24b348c5f83beb23418318a109c9a7b2459862 100644 (file)
@@ -16,22 +16,14 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do
     end
 
     test "with the relay disabled, it returns 404", %{conn: conn} do
-      instance =
-        Application.get_env(:pleroma, :instance)
-        |> Keyword.put(:allow_relay, false)
-
-      Application.put_env(:pleroma, :instance, instance)
+      Pleroma.Config.put([:instance, :allow_relay], false)
 
       res =
         conn
         |> get(activity_pub_path(conn, :relay))
         |> json_response(404)
 
-      instance =
-        Application.get_env(:pleroma, :instance)
-        |> Keyword.put(:allow_relay, true)
-
-      Application.put_env(:pleroma, :instance, instance)
+      Pleroma.Config.put([:instance, :allow_relay], true)
     end
   end