aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-05-03 16:08:24 +0200
committerRoger Braun <roger@rogerbraun.net>2017-05-03 16:08:24 +0200
commitdf71c142cfadaae8866303768bca00c343b8bed1 (patch)
tree0b7336976740466acaaa1f823e0eba2614a470ed /test
parent8141024259ee4bebd58d6ecd963f181aad420846 (diff)
downloadpleroma-df71c142cfadaae8866303768bca00c343b8bed1.tar.gz
Remove doubled 'to' recipients.
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/activity_pub_test.exs7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs
index 6e42fbda2..dfa73b775 100644
--- a/test/web/activity_pub/activity_pub_test.exs
+++ b/test/web/activity_pub/activity_pub_test.exs
@@ -40,6 +40,13 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
end
end
+ describe "create activities" do
+ test "removes doubled 'to' recipients" do
+ {:ok, activity} = ActivityPub.create(["user1", "user1", "user2"], %User{ap_id: "1"}, "", %{})
+ assert activity.data["to"] == ["user1", "user2"]
+ end
+ end
+
describe "fetch activities for recipients" do
test "retrieve the activities for certain recipients" do
{:ok, activity_one} = ActivityBuilder.insert(%{"to" => ["someone"]})