added test helpers to clear config after tests

This commit is contained in:
Maksim 2019-08-19 15:34:29 +00:00 committed by lain
commit a320358703
40 changed files with 213 additions and 420 deletions

View file

@ -4,15 +4,7 @@
defmodule Pleroma.Web.FederatingPlugTest do
use Pleroma.Web.ConnCase
setup_all do
config_path = [:instance, :federating]
initial_setting = Pleroma.Config.get(config_path)
on_exit(fn -> Pleroma.Config.put(config_path, initial_setting) end)
:ok
end
clear_config_all([:instance, :federating])
test "returns and halt the conn when federating is disabled" do
Pleroma.Config.put([:instance, :federating], false)