summaryrefslogtreecommitdiff
path: root/test/web/activity_pub
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-07-02 10:08:42 +0000
committerrinpatch <rinpatch@sdf.org>2020-07-02 10:08:42 +0000
commitb0439df1b529301c8f07097bedb1cba2602a4143 (patch)
treee3085f3ecfa1e564194e99454618f3af46e03d8f /test/web/activity_pub
parentd884b6f704b3d6e5f4b09349224a0c498b75a09b (diff)
parentbad08f34caf0f037b5d6e724628a222fe65b751b (diff)
downloadpleroma-b0439df1b529301c8f07097bedb1cba2602a4143.tar.gz
pleroma-b0439df1b529301c8f07097bedb1cba2602a4143.zip
Merge branch '1907-fix-announce-streaming' into 'develop'
Resolve "Streaming API: Repeats of your posts from random people are pushed to the timeline" Closes #1907 See merge request pleroma/pleroma!2714
Diffstat (limited to 'test/web/activity_pub')
-rw-r--r--test/web/activity_pub/side_effects_test.exs23
1 files changed, 21 insertions, 2 deletions
diff --git a/test/web/activity_pub/side_effects_test.exs b/test/web/activity_pub/side_effects_test.exs
index af27c34b4..2649b060a 100644
--- a/test/web/activity_pub/side_effects_test.exs
+++ b/test/web/activity_pub/side_effects_test.exs
@@ -589,10 +589,29 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
end
test "it streams out the announce", %{announce: announce} do
- with_mock Pleroma.Web.ActivityPub.ActivityPub, [:passthrough], stream_out: fn _ -> nil end do
+ with_mocks([
+ {
+ Pleroma.Web.Streamer,
+ [],
+ [
+ stream: fn _, _ -> nil end
+ ]
+ },
+ {
+ Pleroma.Web.Push,
+ [],
+ [
+ send: fn _ -> nil end
+ ]
+ }
+ ]) do
{:ok, announce, _} = SideEffects.handle(announce)
- assert called(Pleroma.Web.ActivityPub.ActivityPub.stream_out(announce))
+ assert called(
+ Pleroma.Web.Streamer.stream(["user", "list", "public", "public:local"], announce)
+ )
+
+ assert called(Pleroma.Web.Push.send(:_))
end
end
end