aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorkaniini <ariadne@dereferenced.org>2019-07-16 11:14:46 +0000
committerkaniini <ariadne@dereferenced.org>2019-07-16 11:14:46 +0000
commitd3b922276138cf7aaa896d52a8e35113a40e22dc (patch)
treeed02c143d7298736e821a507acd01d3931249a3f /test
parenta0d71d3ccfeece9deab213a627720dfc2aaf51be (diff)
parent520ee6c59162c26caf032b2d16ca975c99b5beb5 (diff)
downloadpleroma-d3b922276138cf7aaa896d52a8e35113a40e22dc.tar.gz
Merge branch 'add-deactivated-to-account-view' into 'develop'
Add `pleroma.deactivated` to the Account entity (Mastodon API) See merge request pleroma/pleroma!1433
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/account_view_test.exs7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/web/mastodon_api/account_view_test.exs b/test/web/mastodon_api/account_view_test.exs
index 83b9db071..fa44d35cc 100644
--- a/test/web/mastodon_api/account_view_test.exs
+++ b/test/web/mastodon_api/account_view_test.exs
@@ -153,6 +153,13 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
assert expected == AccountView.render("account.json", %{user: user})
end
+ test "Represent a deactivated user for an admin" do
+ admin = insert(:user, %{info: %{is_admin: true}})
+ deactivated_user = insert(:user, %{info: %{deactivated: true}})
+ represented = AccountView.render("account.json", %{user: deactivated_user, for: admin})
+ assert represented[:pleroma][:deactivated] == true
+ end
+
test "Represent a smaller mention" do
user = insert(:user)