summaryrefslogtreecommitdiff
path: root/test/web/pleroma_api/views
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-07-22 19:06:00 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-07-22 19:06:00 +0300
commit6f5f7af607518b6f67df68bab9bf76142e9a622c (patch)
tree42b8040061d9401865c28e6de4f8bb454bf0ba79 /test/web/pleroma_api/views
parent1c9752cff445ab1f58cea1617d3c7ab73da60e10 (diff)
downloadpleroma-6f5f7af607518b6f67df68bab9bf76142e9a622c.tar.gz
pleroma-6f5f7af607518b6f67df68bab9bf76142e9a622c.zip
[#1973] Fixed accounts rendering in GET /api/v1/pleroma/chats with truish :restrict_unauthenticated.
Made `Pleroma.Web.MastodonAPI.AccountView.render("show.json", _)` demand :for or :force option in order to prevent incorrect rendering of empty map instead of expected user representation with truish :restrict_unauthenticated setting.
Diffstat (limited to 'test/web/pleroma_api/views')
-rw-r--r--test/web/pleroma_api/views/chat_view_test.exs2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/web/pleroma_api/views/chat_view_test.exs b/test/web/pleroma_api/views/chat_view_test.exs
index 14eecb1bd..46d47cd4f 100644
--- a/test/web/pleroma_api/views/chat_view_test.exs
+++ b/test/web/pleroma_api/views/chat_view_test.exs
@@ -26,7 +26,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatViewTest do
assert represented_chat == %{
id: "#{chat.id}",
- account: AccountView.render("show.json", user: recipient),
+ account: AccountView.render("show.json", user: recipient, force: true),
unread: 0,
last_message: nil,
updated_at: Utils.to_masto_date(chat.updated_at)