X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=inline;f=test%2Fpleroma%2Fweb%2Frich_media%2Fhelpers_test.exs;h=689854fb65ae57106d4588601b724eb31a929c2c;hb=ffc5944334174d83655d38d1c07256cfb65e5fcc;hp=4c9ee77d0c60fa3010d3cdae14479b7c0ba64dbb;hpb=ddf36b096e3f6e2fa1cdca5d59db98ade696df20;p=akkoma
diff --git a/test/pleroma/web/rich_media/helpers_test.exs b/test/pleroma/web/rich_media/helpers_test.exs
index 4c9ee77d0..689854fb6 100644
--- a/test/pleroma/web/rich_media/helpers_test.exs
+++ b/test/pleroma/web/rich_media/helpers_test.exs
@@ -1,11 +1,10 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.RichMedia.HelpersTest do
use Pleroma.DataCase
- alias Pleroma.Config
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.RichMedia.Helpers
@@ -29,7 +28,7 @@ defmodule Pleroma.Web.RichMedia.HelpersTest do
content_type: "text/markdown"
})
- Config.put([:rich_media, :enabled], true)
+ clear_config([:rich_media, :enabled], true)
assert %{} == Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
end
@@ -43,7 +42,7 @@ defmodule Pleroma.Web.RichMedia.HelpersTest do
content_type: "text/markdown"
})
- Config.put([:rich_media, :enabled], true)
+ clear_config([:rich_media, :enabled], true)
assert %{} == Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
end
@@ -57,7 +56,7 @@ defmodule Pleroma.Web.RichMedia.HelpersTest do
content_type: "text/markdown"
})
- Config.put([:rich_media, :enabled], true)
+ clear_config([:rich_media, :enabled], true)
assert %{page_url: "https://example.com/ogp", rich_media: _} =
Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
@@ -74,7 +73,7 @@ defmodule Pleroma.Web.RichMedia.HelpersTest do
{:ok, activity4} = CommonAPI.post(user, %{status: "https://192.168.10.40/notice/9kCP7V"})
{:ok, activity5} = CommonAPI.post(user, %{status: "https://pleroma.local/notice/9kCP7V"})
- Config.put([:rich_media, :enabled], true)
+ clear_config([:rich_media, :enabled], true)
assert %{} = Helpers.fetch_data_for_activity(activity)
assert %{} = Helpers.fetch_data_for_activity(activity2)