X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fmastodon_api%2Fmastodon_api_controller_test.exs;h=d118026eb3b4d521c1d8bf59fd98e13912d1c6fc;hb=c6b9b777dacef2fce51e43a25e3af9c9fac9a87e;hp=c91f96f38305385610e5a0b3812c0f7ac8f4b909;hpb=5bf92e50be76b9dc2fa682b9f2ae252c0faad64e;p=akkoma 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)