Merge branch 'fix/status-reblogged' into 'develop'
[akkoma] / test / web / mastodon_api / status_view_test.exs
index e1c9b2c8f61a03897673143f77800204d8b346ae..db2fdc2f6dda92a15df7e0f3020ee301f5c387fe 100644 (file)
@@ -101,7 +101,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
       muted: false,
       pinned: false,
       sensitive: false,
-      spoiler_text: note.data["object"]["summary"],
+      spoiler_text: HtmlSanitizeEx.basic_html(note.data["object"]["summary"]),
       visibility: "public",
       media_attachments: [],
       mentions: [],
@@ -126,7 +126,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
       ],
       pleroma: %{
         local: true,
-        conversation_id: convo_id
+        conversation_id: convo_id,
+        content: %{"text/plain" => HtmlSanitizeEx.strip_tags(note.data["object"]["content"])},
+        spoiler_text: %{"text/plain" => HtmlSanitizeEx.strip_tags(note.data["object"]["summary"])}
       }
     }
 
@@ -175,7 +177,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
 
     status = StatusView.render("status.json", %{activity: activity})
 
-    actor = Repo.get_by(User, ap_id: activity.actor)
+    actor = User.get_by_ap_id(activity.actor)
 
     assert status.mentions ==
              Enum.map([user, actor], fn u -> AccountView.render("mention.json", %{user: u}) end)