MastoAPI: Add list of blocked users.
This commit is contained in:
parent
5bf92e50be
commit
c6b9b777da
3 changed files with 25 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue