1
0
Fork 0
mirror of https://git.pleroma.social/pleroma/pleroma.git synced 2026-02-15 17:16:57 +00:00

Add id to objects, too.

This commit is contained in:
Roger Braun 2017-03-23 21:22:49 +01:00
parent 1f0f79d959
commit 74112ef99e
2 changed files with 26 additions and 0 deletions

View file

@ -24,6 +24,17 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
assert activity.data["ok"] == data["ok"]
assert activity.data["id"] == given_id
end
test "adds an id to a given object if it lacks one" do
data = %{
"object" => %{
"ok" => true
}
}
{:ok, %Activity{} = activity} = ActivityPub.insert(data)
assert is_binary(activity.data["object"]["id"])
end
end
describe "fetch activities for recipients" do