Merge branch 'hj-happiness-improvement' into 'develop'
[akkoma] / test / web / mastodon_api / status_view_test.exs
index e33479368d9ed5cec9c925656d5e7e605a069da2..f957fedac6bd8d1e6bbdd039dc0d8dd1f515a42c 100644 (file)
@@ -84,6 +84,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
       account: AccountView.render("account.json", %{user: user}),
       in_reply_to_id: nil,
       in_reply_to_account_id: nil,
+      card: nil,
       reblog: nil,
       content: HtmlSanitizeEx.basic_html(note.data["object"]["content"]),
       created_at: created_at,
@@ -149,7 +150,10 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
 
     status = StatusView.render("status.json", %{activity: activity})
 
-    assert status.mentions == [AccountView.render("mention.json", %{user: user})]
+    actor = Repo.get_by(User, ap_id: activity.actor)
+
+    assert status.mentions ==
+             Enum.map([user, actor], fn u -> AccountView.render("mention.json", %{user: u}) end)
   end
 
   test "attachments" do