summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api
diff options
context:
space:
mode:
Diffstat (limited to 'test/web/mastodon_api')
-rw-r--r--test/web/mastodon_api/status_view_test.exs12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs
index db2fdc2f6..4ea50c7c6 100644
--- a/test/web/mastodon_api/status_view_test.exs
+++ b/test/web/mastodon_api/status_view_test.exs
@@ -7,6 +7,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
alias Pleroma.Activity
alias Pleroma.User
+ alias Pleroma.Repo
+ alias Pleroma.Object
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.CommonAPI.Utils
@@ -53,14 +55,14 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
test "a note with null content" do
note = insert(:note_activity)
+ note_object = Object.normalize(note.data["object"])
data =
- note.data
- |> put_in(["object", "content"], nil)
+ note_object.data
+ |> Map.put("content", nil)
- note =
- note
- |> Map.put(:data, data)
+ Object.change(note_object, %{data: data})
+ |> Repo.update()
User.get_cached_by_ap_id(note.data["actor"])