diff options
author | Eugenij <eugenijm@protonmail.com> | 2019-07-16 11:14:46 +0000 |
---|---|---|
committer | kaniini <ariadne@dereferenced.org> | 2019-07-16 11:14:46 +0000 |
commit | 520ee6c59162c26caf032b2d16ca975c99b5beb5 (patch) | |
tree | ed02c143d7298736e821a507acd01d3931249a3f /test | |
parent | a0d71d3ccfeece9deab213a627720dfc2aaf51be (diff) | |
download | pleroma-520ee6c59162c26caf032b2d16ca975c99b5beb5.tar.gz |
Add `pleroma.deactivated` to the Account entity (Mastodon API)
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/account_view_test.exs | 7 |
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) |