aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/web/metadata/opengraph_test.exs30
1 files changed, 4 insertions, 26 deletions
diff --git a/test/web/metadata/opengraph_test.exs b/test/web/metadata/opengraph_test.exs
index 1c4fadc46..c3502bad3 100644
--- a/test/web/metadata/opengraph_test.exs
+++ b/test/web/metadata/opengraph_test.exs
@@ -1,6 +1,7 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.Metadata.Providers.OpenGraphTest do
use Pleroma.DataCase
import Pleroma.Factory
@@ -47,19 +48,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraphTest do
}
})
- note_activity =
- insert(:note_activity, %{
- data: %{
- "actor" => note.data["actor"],
- "to" => note.data["to"],
- "object" => note.data,
- "context" => note.data["context"]
- },
- actor: note.data["actor"],
- recipients: note.data["to"]
- })
-
- result = OpenGraph.build_tags(%{activity: note_activity, user: user})
+ result = OpenGraph.build_tags(%{object: note, user: user})
assert Enum.all?(
[
@@ -85,6 +74,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraphTest do
"id" => "https://pleroma.gov/objects/whatever",
"content" => "#cuteposting #nsfw #hambaga",
"tag" => ["cuteposting", "nsfw", "hambaga"],
+ "sensitive" => true,
"attachment" => [
%{
"url" => [
@@ -95,19 +85,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraphTest do
}
})
- note_activity =
- insert(:note_activity, %{
- data: %{
- "actor" => note.data["actor"],
- "to" => note.data["to"],
- "object" => note.data,
- "context" => note.data["context"]
- },
- actor: note.data["actor"],
- recipients: note.data["to"]
- })
-
- result = OpenGraph.build_tags(%{activity: note_activity, user: user})
+ result = OpenGraph.build_tags(%{object: note, user: user})
assert {:meta, [property: "og:image", content: "https://pleroma.gov/tenshi.png"], []} in result