summaryrefslogtreecommitdiff
path: root/test/support/factory.ex
diff options
context:
space:
mode:
Diffstat (limited to 'test/support/factory.ex')
-rw-r--r--test/support/factory.ex17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/support/factory.ex b/test/support/factory.ex
index 3fc9cf710..b7dead7f6 100644
--- a/test/support/factory.ex
+++ b/test/support/factory.ex
@@ -64,4 +64,21 @@ defmodule Pleroma.Factory do
data: data
}
end
+
+ def follow_activity_factory do
+ follower = insert(:user)
+ followed = insert(:user)
+
+ data = %{
+ "id" => Pleroma.Web.ActivityPub.ActivityPub.generate_activity_id,
+ "actor" => follower.ap_id,
+ "type" => "Follow",
+ "object" => followed.ap_id,
+ "published_at" => DateTime.utc_now() |> DateTime.to_iso8601
+ }
+
+ %Pleroma.Activity{
+ data: data
+ }
+ end
end