projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into feature/database-compaction
[akkoma]
/
test
/
web
/
mastodon_api
/
status_view_test.exs
diff --git
a/test/web/mastodon_api/status_view_test.exs
b/test/web/mastodon_api/status_view_test.exs
index db2fdc2f6dda92a15df7e0f3020ee301f5c387fe..4ea50c7c698dbeec43d33f7b9287b9e0ea3b703b 100644
(file)
--- 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.Activity
alias Pleroma.User
+ alias Pleroma.Repo
+ alias Pleroma.Object
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.CommonAPI.Utils
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)
test "a note with null content" do
note = insert(:note_activity)
+ note_object = Object.normalize(note.data["object"])
data =
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"])
User.get_cached_by_ap_id(note.data["actor"])