summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLain Soykaf <lain@soykaf.club>2020-07-24 14:40:22 +0200
committerLain Soykaf <lain@soykaf.club>2020-07-24 14:40:22 +0200
commit3d13fb05f851d127d852ee9c26afa4dab61410ad (patch)
tree6af48a9088fcbe18882441639cb14a00627049a1 /test
parent91f3cf9bc6e8e8567d20bb859ee0bb9854a20a07 (diff)
downloadpleroma-3d13fb05f851d127d852ee9c26afa4dab61410ad.tar.gz
pleroma-3d13fb05f851d127d852ee9c26afa4dab61410ad.zip
Side Effects: On undoing, put information about the undone object.
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/side_effects_test.exs9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/web/activity_pub/side_effects_test.exs b/test/web/activity_pub/side_effects_test.exs
index 2649b060a..d48c235c0 100644
--- a/test/web/activity_pub/side_effects_test.exs
+++ b/test/web/activity_pub/side_effects_test.exs
@@ -312,8 +312,13 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
}
end
- test "deletes the original block", %{block_undo: block_undo, block: block} do
- {:ok, _block_undo, _} = SideEffects.handle(block_undo)
+ test "deletes the original block, but sets `embedded_object`", %{
+ block_undo: block_undo,
+ block: block
+ } do
+ {:ok, _block_undo, meta} = SideEffects.handle(block_undo)
+
+ assert meta[:embedded_object] == block.data
refute Activity.get_by_id(block.id)
end