diff options
Diffstat (limited to 'test/web/mastodon_api/controllers')
| -rw-r--r-- | test/web/mastodon_api/controllers/timeline_controller_test.exs | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/test/web/mastodon_api/controllers/timeline_controller_test.exs b/test/web/mastodon_api/controllers/timeline_controller_test.exs index c6e0268fd..e2a830811 100644 --- a/test/web/mastodon_api/controllers/timeline_controller_test.exs +++ b/test/web/mastodon_api/controllers/timeline_controller_test.exs @@ -126,6 +126,24 @@ defmodule Pleroma.Web.MastodonAPI.TimelineControllerTest do        [%{"id" => ^reply_from_me}, %{"id" => ^activity_id}] = response      end +    test "doesn't return posts from users who blocked you when :blockers_visible is disabled" do +      clear_config([:activitypub, :blockers_visible], false) + +      %{conn: conn, user: blockee} = oauth_access(["read:statuses"]) +      blocker = insert(:user) +      {:ok, _} = User.block(blocker, blockee) + +      conn = assign(conn, :user, blockee) + +      {:ok, _} = CommonAPI.post(blocker, %{status: "hey!"}) + +      response = +        get(conn, "/api/v1/timelines/public") +        |> json_response_and_validate_schema(200) + +      assert length(response) == 0 +    end +      test "doesn't return replies if follow is posting with users from blocked domain" do        %{conn: conn, user: blocker} = oauth_access(["read:statuses"])        friend = insert(:user) | 
