Convert tests to all use clear_config instead of Pleroma.Config.put

This commit is contained in:
Mark Felder 2021-01-26 11:58:43 -06:00
commit e854c35e65
69 changed files with 325 additions and 368 deletions

View file

@ -56,7 +56,7 @@ defmodule Pleroma.Web.FederatorTest do
activity: activity,
relay_mock: relay_mock
} do
Pleroma.Config.put([:instance, :allow_relay], false)
clear_config([:instance, :allow_relay], false)
with_mocks([relay_mock]) do
Federator.publish(activity)
@ -155,9 +155,9 @@ defmodule Pleroma.Web.FederatorTest do
end
test "it does not crash if MRF rejects the post" do
Pleroma.Config.put([:mrf_keyword, :reject], ["lain"])
clear_config([:mrf_keyword, :reject], ["lain"])
Pleroma.Config.put(
clear_config(
[:mrf, :policies],
Pleroma.Web.ActivityPub.MRF.KeywordPolicy
)