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

@ -66,7 +66,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraphTest do
end
test "it does not render attachments if post is nsfw" do
Pleroma.Config.put([Pleroma.Web.Metadata, :unfurl_nsfw], false)
clear_config([Pleroma.Web.Metadata, :unfurl_nsfw], false)
user = insert(:user, avatar: %{"url" => [%{"href" => "https://pleroma.gov/tenshi.png"}]})
note =

View file

@ -54,7 +54,7 @@ defmodule Pleroma.Web.Metadata.Providers.TwitterCardTest do
end
test "it renders avatar not attachment if post is nsfw and unfurl_nsfw is disabled" do
Pleroma.Config.put([Pleroma.Web.Metadata, :unfurl_nsfw], false)
clear_config([Pleroma.Web.Metadata, :unfurl_nsfw], false)
user = insert(:user, name: "Jimmy Hendriks", bio: "born 19 March 1994")
{:ok, activity} = CommonAPI.post(user, %{status: "HI"})