diff options
author | lain <lain@soykaf.club> | 2019-02-27 16:37:42 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-02-27 16:37:42 +0100 |
commit | c4235f96bde49def1fb6927ba79a49a0f75cd60a (patch) | |
tree | c906002a67b324e0d21eec47c5a9bc526175423a /test | |
parent | 14bc6bd40f0ea7879cd75444939669ee6e6ac85c (diff) | |
download | pleroma-c4235f96bde49def1fb6927ba79a49a0f75cd60a.tar.gz |
Add `with_muted` param.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/activity_pub/activity_pub_test.exs | 7 |
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 11262c523..ac3a565de 100644 --- a/test/web/activity_pub/activity_pub_test.exs +++ b/test/web/activity_pub/activity_pub_test.exs @@ -291,6 +291,13 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do assert Enum.member?(activities, activity_three) refute Enum.member?(activities, activity_one) + # Calling with 'with_muted' will deliver muted activities, too. + activities = ActivityPub.fetch_activities([], %{"muting_user" => user, "with_muted" => true}) + + assert Enum.member?(activities, activity_two) + assert Enum.member?(activities, activity_three) + assert Enum.member?(activities, activity_one) + {:ok, user} = User.unmute(user, %User{ap_id: activity_one.data["actor"]}) activities = ActivityPub.fetch_activities([], %{"muting_user" => user}) |