2017-12-11 09:19:46 -08:00
|
|
|
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"
|
2018-11-08 07:05:28 -08:00
|
|
|
assert result["@context"]
|
2017-12-11 09:19:46 -08:00
|
|
|
end
|
|
|
|
end
|