Add domain_blocking to the relationship API (GET /api/v1/accounts/relationships)
This commit is contained in:
parent
53fad36b57
commit
4504135894
4 changed files with 30 additions and 12 deletions
|
|
@ -231,6 +231,16 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
|||
AccountView.render("relationship.json", %{user: user, target: other_user})
|
||||
end
|
||||
|
||||
test "represent a relationship for the user blocking a domain" do
|
||||
user = insert(:user)
|
||||
other_user = insert(:user, ap_id: "https://bad.site/users/other_user")
|
||||
|
||||
{:ok, user} = User.block_domain(user, "bad.site")
|
||||
|
||||
assert %{domain_blocking: true, blocking: false} =
|
||||
AccountView.render("relationship.json", %{user: user, target: other_user})
|
||||
end
|
||||
|
||||
test "represent a relationship for the user with a pending follow request" do
|
||||
user = insert(:user)
|
||||
other_user = insert(:user, %{info: %User.Info{locked: true}})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue