projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'MAIN/develop' into feature/jobs
[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 d30ae61495214955471940ef490f334f73fc727f..f957fedac6bd8d1e6bbdd039dc0d8dd1f515a42c 100644
(file)
--- a/
test/web/mastodon_api/status_view_test.exs
+++ b/
test/web/mastodon_api/status_view_test.exs
@@
-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,
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,
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})
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
end
test "attachments" do
@@
-202,7
+206,7
@@
defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
"https://peertube.moe/videos/watch/df5f464b-be8d-46fb-ad81-2d4c2d1630e3"
)
"https://peertube.moe/videos/watch/df5f464b-be8d-46fb-ad81-2d4c2d1630e3"
)
- %Activity{} = activity = Activity.get_create_
activity_
by_object_ap_id(object.data["id"])
+ %Activity{} = activity = Activity.get_create_by_object_ap_id(object.data["id"])
represented = StatusView.render("status.json", %{for: user, activity: activity})
represented = StatusView.render("status.json", %{for: user, activity: activity})