another view for account in admin-fe status_show
This commit is contained in:
parent
c8803965af
commit
8f08384d80
|
@ -42,7 +42,7 @@ def index(%{assigns: %{user: _admin}} = conn, params) do
|
|||
def show(conn, %{id: id}) do
|
||||
with %Activity{} = activity <- Activity.get_by_id(id) do
|
||||
conn
|
||||
|> put_view(MastodonAPI.StatusView)
|
||||
|> put_view(Pleroma.Web.AdminAPI.StatusView)
|
||||
|> render("show.json", %{activity: activity})
|
||||
else
|
||||
nil -> {:error, :not_found}
|
||||
|
|
|
@ -42,6 +42,14 @@ test "shows activity", %{conn: conn} do
|
|||
|> json_response_and_validate_schema(200)
|
||||
|
||||
assert response["id"] == activity.id
|
||||
|
||||
account = response["account"]
|
||||
actor = User.get_by_ap_id(activity.actor)
|
||||
|
||||
assert account["id"] == actor.id
|
||||
assert account["nickname"] == actor.nickname
|
||||
assert account["deactivated"] == actor.deactivated
|
||||
assert account["confirmation_pending"] == actor.confirmation_pending
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue