diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs index c91f96f38..d118026eb 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -309,6 +309,20 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do assert %{"id" => id, "blocking" => false} = json_response(conn, 200) end + test "getting a list of blocks", %{conn: conn} do + user = insert(:user) + other_user = insert(:user) + + {:ok, user} = User.block(user, other_user) + + conn = conn + |> assign(:user, user) + |> get("/api/v1/blocks") + + other_user_id = other_user.id + assert [%{"id" => ^other_user_id}] = json_response(conn, 200) + end + test "unimplemented mute endpoints" do user = insert(:user) other_user = insert(:user) |