diff options
author | tusooa <tusooa@kazv.moe> | 2022-09-11 17:10:26 +0000 |
---|---|---|
committer | tusooa <tusooa@kazv.moe> | 2022-09-11 17:10:26 +0000 |
commit | ac427de851ff8981710c671c12f66c3e756a4bc4 (patch) | |
tree | 6f225d6693667e00284bfd688ffbc0057ec63893 /test | |
parent | 453a66f8c268580148475e11a7d4141ac7e93515 (diff) | |
parent | 0b19625bfba0ef4a9a4c97bada981dfb5c1edbf4 (diff) | |
download | pleroma-ac427de851ff8981710c671c12f66c3e756a4bc4.tar.gz |
Merge branch 'fix/undo-boosts' into 'develop'
ObjectView: do not fetch an object for its ID
See merge request pleroma/pleroma!3753
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/activity_pub/views/object_view_test.exs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/pleroma/web/activity_pub/views/object_view_test.exs b/test/pleroma/web/activity_pub/views/object_view_test.exs index 48a4b47c4..d94878e31 100644 --- a/test/pleroma/web/activity_pub/views/object_view_test.exs +++ b/test/pleroma/web/activity_pub/views/object_view_test.exs @@ -81,4 +81,18 @@ defmodule Pleroma.Web.ActivityPub.ObjectViewTest do assert result["object"] == object.data["id"] assert result["type"] == "Announce" end + + test "renders an undo announce activity" do + note = insert(:note_activity) + user = insert(:user) + + {:ok, announce} = CommonAPI.repeat(note.id, user) + {:ok, undo} = CommonAPI.unrepeat(note.id, user) + + result = ObjectView.render("object.json", %{object: undo}) + + assert result["id"] == undo.data["id"] + assert result["object"] == announce.data["id"] + assert result["type"] == "Undo" + end end |