From: dtluna Date: Fri, 28 Apr 2017 13:06:57 +0000 (+0300) Subject: Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into feature/unfollow... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=a9b2ad17596d1b6deca646239a95e94dc644ebf3;p=akkoma Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into feature/unfollow-activity --- a9b2ad17596d1b6deca646239a95e94dc644ebf3 diff --cc test/support/factory.ex index b7dead7f6,d7c16f0e0..1662d4cd6 --- a/test/support/factory.ex +++ b/test/support/factory.ex @@@ -65,20 -65,13 +65,30 @@@ defmodule Pleroma.Factory d } 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", + callback: "http://example/org/callback", + secret: "here's a secret", + valid_until: NaiveDateTime.add(NaiveDateTime.utc_now, 100), + state: "requested" + } + end end