diff options
author | rinpatch <rinpatch@sdf.org> | 2019-01-18 09:32:52 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-01-18 09:32:52 +0300 |
commit | 1b1af4798a74c4ab357140ef2c5928dd9ebd3221 (patch) | |
tree | 06b31a588dd23fa87949bce1e28178b95e46ef90 /test | |
parent | 64143d8040a5806ccf9707644a7e7eacc91d74c6 (diff) | |
download | pleroma-1b1af4798a74c4ab357140ef2c5928dd9ebd3221.tar.gz |
Use object instead of activity for metadata
Diffstat (limited to 'test')
-rw-r--r-- | test/web/metadata/opengraph_test.exs | 30 |
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 |