ChatMessageReference -> Chat.MessageReference
This commit is contained in:
parent
137adef6e0
commit
ca0e6e702b
14 changed files with 66 additions and 68 deletions
|
|
@ -7,7 +7,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
|
|||
|
||||
alias Pleroma.Activity
|
||||
alias Pleroma.Chat
|
||||
alias Pleroma.ChatMessageReference
|
||||
alias Pleroma.Chat.MessageReference
|
||||
alias Pleroma.Notification
|
||||
alias Pleroma.Object
|
||||
alias Pleroma.Repo
|
||||
|
|
@ -17,7 +17,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
|
|||
alias Pleroma.Web.MastodonAPI.AccountView
|
||||
alias Pleroma.Web.MastodonAPI.NotificationView
|
||||
alias Pleroma.Web.MastodonAPI.StatusView
|
||||
alias Pleroma.Web.PleromaAPI.ChatMessageReferenceView
|
||||
alias Pleroma.Web.PleromaAPI.Chat.MessageReferenceView
|
||||
import Pleroma.Factory
|
||||
|
||||
defp test_notifications_rendering(notifications, user, expected_result) do
|
||||
|
|
@ -45,15 +45,14 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
|
|||
object = Object.normalize(activity)
|
||||
chat = Chat.get(recipient.id, user.ap_id)
|
||||
|
||||
cm_ref = ChatMessageReference.for_chat_and_object(chat, object)
|
||||
cm_ref = MessageReference.for_chat_and_object(chat, object)
|
||||
|
||||
expected = %{
|
||||
id: to_string(notification.id),
|
||||
pleroma: %{is_seen: false},
|
||||
type: "pleroma:chat_mention",
|
||||
account: AccountView.render("show.json", %{user: user, for: recipient}),
|
||||
chat_message:
|
||||
ChatMessageReferenceView.render("show.json", %{chat_message_reference: cm_ref}),
|
||||
chat_message: MessageReferenceView.render("show.json", %{chat_message_reference: cm_ref}),
|
||||
created_at: Utils.to_masto_date(notification.inserted_at)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue