X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fmetadata%2Fopengraph_test.exs;h=218540e6c36b9eb370a33486ccd3b44405c84b22;hb=dee4639dbb1245d4514b7b81d567321f9b4ee099;hp=c3502bad307d11092c8578f681c139e29603a02a;hpb=c9b418e5477229017b3750c55cf3ea3d03b7e609;p=akkoma
diff --git a/test/web/metadata/opengraph_test.exs b/test/web/metadata/opengraph_test.exs
index c3502bad3..218540e6c 100644
--- a/test/web/metadata/opengraph_test.exs
+++ b/test/web/metadata/opengraph_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Metadata.Providers.OpenGraphTest do
@@ -7,6 +7,8 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraphTest do
import Pleroma.Factory
alias Pleroma.Web.Metadata.Providers.OpenGraph
+ setup do: clear_config([Pleroma.Web.Metadata, :unfurl_nsfw])
+
test "it renders all supported types of attachments and skips unknown types" do
user = insert(:user)
@@ -48,7 +50,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraphTest do
}
})
- result = OpenGraph.build_tags(%{object: note, user: user})
+ result = OpenGraph.build_tags(%{object: note, url: note.data["id"], user: user})
assert Enum.all?(
[
@@ -85,7 +87,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraphTest do
}
})
- result = OpenGraph.build_tags(%{object: note, user: user})
+ result = OpenGraph.build_tags(%{object: note, url: note.data["id"], user: user})
assert {:meta, [property: "og:image", content: "https://pleroma.gov/tenshi.png"], []} in result