diff options
author | Eugenij <eugenijm@protonmail.com> | 2019-07-24 15:12:27 +0000 |
---|---|---|
committer | kaniini <ariadne@dereferenced.org> | 2019-07-24 15:12:27 +0000 |
commit | 4504135894d5b52c74818fadc3f7ed49ace1702b (patch) | |
tree | c3a6c24c3fda9442dd662b100135c6966a44989c /test | |
parent | 53fad36b57b61b28db595e445cd01fd6044dab6b (diff) | |
download | pleroma-4504135894d5b52c74818fadc3f7ed49ace1702b.tar.gz pleroma-4504135894d5b52c74818fadc3f7ed49ace1702b.zip |
Add `domain_blocking` to the relationship API (GET /api/v1/accounts/relationships)
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/account_view_test.exs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/web/mastodon_api/account_view_test.exs b/test/web/mastodon_api/account_view_test.exs index fa44d35cc..905e9af98 100644 --- a/test/web/mastodon_api/account_view_test.exs +++ b/test/web/mastodon_api/account_view_test.exs @@ -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}}) |