diff options
author | lain <lain@soykaf.club> | 2019-09-30 15:51:09 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-09-30 15:51:09 +0200 |
commit | 08256e9299494c0bcd1a295c6079263277b21ba7 (patch) | |
tree | 3282dd0ba6d4ce6422219141f617b23638c245de /test | |
parent | 6068d2254e2ed00260dc840f18824dc0e0835afa (diff) | |
download | pleroma-08256e9299494c0bcd1a295c6079263277b21ba7.tar.gz pleroma-08256e9299494c0bcd1a295c6079263277b21ba7.zip |
ActivityPub: Federate reactions.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/activity_pub/activity_pub_test.exs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs index 3e6f389bc..4dc7d96d2 100644 --- a/test/web/activity_pub/activity_pub_test.exs +++ b/test/web/activity_pub/activity_pub_test.exs @@ -727,6 +727,18 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do end describe "react to an object" do + test_with_mock "sends an activity to federation", Pleroma.Web.Federator, [:passthrough], [] do + Pleroma.Config.put([:instance, :federating], true) + user = insert(:user) + reactor = insert(:user) + {:ok, activity} = CommonAPI.post(user, %{"status" => "YASSSS queen slay"}) + assert object = Object.normalize(activity) + + {:ok, reaction_activity, _object} = ActivityPub.react_with_emoji(reactor, object, "🔥") + + assert called(Pleroma.Web.Federator.publish(reaction_activity)) + end + test "adds an emoji reaction activity to the db" do user = insert(:user) reactor = insert(:user) |