summaryrefslogtreecommitdiff
path: root/test/user_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-04-22 17:21:13 +0200
committerlain <lain@soykaf.club>2020-04-22 17:21:13 +0200
commit7a3a88a13ef526fba18bb6aeadc93f5da934dc5b (patch)
treec2d0521aab54250b1d96eb7f89cf8a402b815bbf /test/user_test.exs
parent1cd38dfffa88384284a8ae0be39f52f25c544936 (diff)
downloadpleroma-7a3a88a13ef526fba18bb6aeadc93f5da934dc5b.tar.gz
pleroma-7a3a88a13ef526fba18bb6aeadc93f5da934dc5b.zip
Streamer: Stream boosts to the boosting user.
Diffstat (limited to 'test/user_test.exs')
-rw-r--r--test/user_test.exs12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/user_test.exs b/test/user_test.exs
index 65e118d6d..cd4041673 100644
--- a/test/user_test.exs
+++ b/test/user_test.exs
@@ -987,6 +987,18 @@ defmodule Pleroma.UserTest do
end
describe "get_recipients_from_activity" do
+ test "works for announces" do
+ actor = insert(:user)
+ user = insert(:user, local: true)
+
+ {:ok, activity} = CommonAPI.post(actor, %{"status" => "hello"})
+ {:ok, announce, _} = CommonAPI.repeat(activity.id, user)
+
+ recipients = User.get_recipients_from_activity(announce)
+
+ assert user in recipients
+ end
+
test "get recipients" do
actor = insert(:user)
user = insert(:user, local: true)