aboutsummaryrefslogtreecommitdiff
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 d7c16f0e0..1662d4cd6 100644
--- a/test/support/factory.ex
+++ b/test/support/factory.ex
@@ -65,6 +65,23 @@ defmodule Pleroma.Factory do
}
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
+
def websub_subscription_factory do
%Pleroma.Web.Websub.WebsubServerSubscription{
topic: "http://example.org",