aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-03-23 21:22:49 +0100
committerRoger Braun <roger@rogerbraun.net>2017-03-23 21:22:49 +0100
commit74112ef99e84f9f19d278faaa8e231b9ea867b2b (patch)
tree75af21ddf92369283037403bfb75a374872dbe47 /test
parent1f0f79d95911769f1a99aebc5df47aa98b38c360 (diff)
downloadpleroma-74112ef99e84f9f19d278faaa8e231b9ea867b2b.tar.gz
Add id to objects, too.
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/activity_pub_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs
index 613c5a04f..6a5138012 100644
--- a/test/web/activity_pub/activity_pub_test.exs
+++ b/test/web/activity_pub/activity_pub_test.exs
@@ -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