summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/account_view_test.exs
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2019-08-02 18:16:04 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2019-08-02 18:16:04 +0300
commit9d4f34fbcb1a8e2eca424b3a3374c9f9af972574 (patch)
treec5943eb5d2652e08cc12d0b58a992376c425e66d /test/web/mastodon_api/account_view_test.exs
parentd2da3d30f3349946500423bab53e0c1221ab7b9b (diff)
parent5ff8f07ca906d77a6ec1d5ba912a787f855364f9 (diff)
downloadpleroma-9d4f34fbcb1a8e2eca424b3a3374c9f9af972574.tar.gz
pleroma-9d4f34fbcb1a8e2eca424b3a3374c9f9af972574.zip
Merge branch 'develop' into feature/digest-email
Diffstat (limited to 'test/web/mastodon_api/account_view_test.exs')
-rw-r--r--test/web/mastodon_api/account_view_test.exs10
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}})