Commit 776bb513 authored by rinpatch's avatar rinpatch
Browse files

Fix muting reblogs tests

parent 6da1999f
Pipeline #9507 passed with stages
in 6 minutes
......@@ -494,7 +494,21 @@ test "doesn't return reblogs for users for whom reblogs have been muted" 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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment