projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into issue/2099
[akkoma]
/
test
/
web
/
pleroma_api
/
views
/
chat_view_test.exs
diff --git
a/test/web/pleroma_api/views/chat_view_test.exs
b/test/web/pleroma_api/views/chat_view_test.exs
index f3bd12616a5063a2d0ba60c4ae73b3d6d54af4ff..02484b705b7ccd380fd60d41d1eb5b5ea2602ba1 100644
(file)
--- a/
test/web/pleroma_api/views/chat_view_test.exs
+++ b/
test/web/pleroma_api/views/chat_view_test.exs
@@
-6,12
+6,12
@@
defmodule Pleroma.Web.PleromaAPI.ChatViewTest do
use Pleroma.DataCase
alias Pleroma.Chat
use Pleroma.DataCase
alias Pleroma.Chat
- alias Pleroma.ChatMessageReference
+ alias Pleroma.Chat
.
MessageReference
alias Pleroma.Object
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.Web.MastodonAPI.AccountView
alias Pleroma.Object
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.CommonAPI.Utils
alias Pleroma.Web.MastodonAPI.AccountView
- alias Pleroma.Web.PleromaAPI.ChatMessageReferenceView
+ alias Pleroma.Web.PleromaAPI.Chat
.
MessageReferenceView
alias Pleroma.Web.PleromaAPI.ChatView
import Pleroma.Factory
alias Pleroma.Web.PleromaAPI.ChatView
import Pleroma.Factory
@@
-26,7
+26,8
@@
defmodule Pleroma.Web.PleromaAPI.ChatViewTest do
assert represented_chat == %{
id: "#{chat.id}",
assert represented_chat == %{
id: "#{chat.id}",
- account: AccountView.render("show.json", user: recipient),
+ account:
+ AccountView.render("show.json", user: recipient, skip_visibility_check: true),
unread: 0,
last_message: nil,
updated_at: Utils.to_masto_date(chat.updated_at)
unread: 0,
last_message: nil,
updated_at: Utils.to_masto_date(chat.updated_at)
@@
-40,9
+41,9
@@
defmodule Pleroma.Web.PleromaAPI.ChatViewTest do
represented_chat = ChatView.render("show.json", chat: chat)
represented_chat = ChatView.render("show.json", chat: chat)
- cm_ref =
Chat
MessageReference.for_chat_and_object(chat, chat_message)
+ cm_ref = MessageReference.for_chat_and_object(chat, chat_message)
assert represented_chat[:last_message] ==
assert represented_chat[:last_message] ==
-
Chat
MessageReferenceView.render("show.json", chat_message_reference: cm_ref)
+ MessageReferenceView.render("show.json", chat_message_reference: cm_ref)
end
end
end
end