summaryrefslogtreecommitdiff
path: root/test/web/activity_pub/activity_pub_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2018-02-18 11:24:54 +0100
committerlain <lain@soykaf.club>2018-02-18 11:24:54 +0100
commit77c6c424a66b4bfc418e43054eaa695ae3e22231 (patch)
treef010a7c3b31f6ad5289bb914d090bb57215c0446 /test/web/activity_pub/activity_pub_test.exs
parentfc9d361d17461bda2e2583578c8b9da944f3e66e (diff)
downloadpleroma-77c6c424a66b4bfc418e43054eaa695ae3e22231.tar.gz
pleroma-77c6c424a66b4bfc418e43054eaa695ae3e22231.zip
ActivityPub: Make fake Create activities for objects without one.
Diffstat (limited to 'test/web/activity_pub/activity_pub_test.exs')
-rw-r--r--test/web/activity_pub/activity_pub_test.exs6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs
index be81e75aa..1debdddd4 100644
--- a/test/web/activity_pub/activity_pub_test.exs
+++ b/test/web/activity_pub/activity_pub_test.exs
@@ -266,8 +266,12 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
end
describe "fetching an object" do
- test "it fetches an existing object" do
+ test "it fetches an object" do
{:ok, object} = ActivityPub.fetch_object_from_id("http://mastodon.example.org/@admin/99541947525187367")
+ assert Activity.get_create_activity_by_object_ap_id(object.data["id"])
+ {:ok, object_again} = ActivityPub.fetch_object_from_id("http://mastodon.example.org/@admin/99541947525187367")
+
+ assert object == object_again
end
end