projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'remotes/origin/develop' into 2168-media-preview-proxy
[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 6062a0cfef122d2e469d510141d63228c8ae0d2e..14eecb1bdcdb626a1372b650862a80020e2c088a 100644
(file)
--- a/
test/web/pleroma_api/views/chat_view_test.exs
+++ b/
test/web/pleroma_api/views/chat_view_test.exs
@@
-6,11
+6,12
@@
defmodule Pleroma.Web.PleromaAPI.ChatViewTest do
use Pleroma.DataCase
alias Pleroma.Chat
use Pleroma.DataCase
alias Pleroma.Chat
+ 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.Chat
Messag
eView
+ alias Pleroma.Web.PleromaAPI.Chat
.MessageReferenc
eView
alias Pleroma.Web.PleromaAPI.ChatView
import Pleroma.Factory
alias Pleroma.Web.PleromaAPI.ChatView
import Pleroma.Factory
@@
-39,7
+40,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 = MessageReference.for_chat_and_object(chat, chat_message)
+
assert represented_chat[:last_message] ==
assert represented_chat[:last_message] ==
-
ChatMessageView.render("show.json", chat: chat, object: chat_message
)
+
MessageReferenceView.render("show.json", chat_message_reference: cm_ref
)
end
end
end
end