summaryrefslogtreecommitdiff
path: root/test/web/activity_pub/views/object_view_test.exs
blob: 6a1311be71cb2274d1fd189731ab07a4d3f4648b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
defmodule Pleroma.Web.ActivityPub.ObjectViewTest do
  use Pleroma.DataCase
  import Pleroma.Factory

  alias Pleroma.Web.ActivityPub.ObjectView

  test "renders a note object" do
    note = insert(:note)

    result = ObjectView.render("object.json", %{object: note})

    assert result["id"] == note.data["id"]
    assert result["to"] == note.data["to"]
    assert result["content"] == note.data["content"]
    assert result["type"] == "Note"
  end
end