X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fmastodon_api%2Fstatus_view_test.exs;fp=test%2Fweb%2Fmastodon_api%2Fstatus_view_test.exs;h=4ea50c7c698dbeec43d33f7b9287b9e0ea3b703b;hb=627e5a0a4992cc19fc65a7e93a09c470c8e2bf33;hp=db2fdc2f6dda92a15df7e0f3020ee301f5c387fe;hpb=73df3046e014ae16e03f16a9c82921652cefcb54;p=akkoma 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"])