diff options
author | lambda <lain@soykaf.club> | 2019-03-27 11:30:07 +0000 |
---|---|---|
committer | lambda <lain@soykaf.club> | 2019-03-27 11:30:07 +0000 |
commit | a5f141d9d524fc130312d1badd7303add6f92907 (patch) | |
tree | 136cf4e2d3e7c64ceddbd81bbd61f095cc7c91e0 | |
parent | 6da1999fc8fc40cd340817e934520efc86c8e2c2 (diff) | |
parent | 776bb5137f6d35b349b9c0e346bfe3426306ccb8 (diff) | |
download | pleroma-a5f141d9d524fc130312d1badd7303add6f92907.tar.gz |
Merge branch 'fix-reblog-tests' into 'develop'
Fix muting reblogs tests
See merge request pleroma/pleroma!984
-rw-r--r-- | test/web/activity_pub/activity_pub_test.exs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/web/activity_pub/activity_pub_test.exs b/test/web/activity_pub/activity_pub_test.exs index 40bcced33..ac5fbe0a9 100644 --- a/test/web/activity_pub/activity_pub_test.exs +++ b/test/web/activity_pub/activity_pub_test.exs @@ -494,7 +494,21 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do activities = ActivityPub.fetch_activities([], %{"muting_user" => user}) - refute Enum.member?(activities, activity) + refute Enum.any?(activities, fn %{id: id} -> id == activity.id end) + end + + test "returns reblogs for users for whom reblogs have not been muted" do + activity = insert(:note_activity) + user = insert(:user) + booster = insert(:user) + {:ok, user} = CommonAPI.hide_reblogs(user, booster) + {:ok, user} = CommonAPI.show_reblogs(user, booster) + + {:ok, activity, _} = CommonAPI.repeat(activity.id, booster) + + activities = ActivityPub.fetch_activities([], %{"muting_user" => user}) + + assert Enum.any?(activities, fn %{id: id} -> id == activity.id end) end end |