summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-07-27 16:39:50 +0200
committerlain <lain@soykaf.club>2020-07-27 16:39:50 +0200
commit9e6f4694dd21f92bb2292e819d0f7f1cad149887 (patch)
tree5f7aebf08a4cb5c2b2f020b5122c885f1a50ec6a /test
parent762c9ea5641ad67f0e664ad584f5cc1a5ed84857 (diff)
downloadpleroma-9e6f4694dd21f92bb2292e819d0f7f1cad149887.tar.gz
pleroma-9e6f4694dd21f92bb2292e819d0f7f1cad149887.zip
Pipeline: Unify embedded_object / object_data, move to validator.
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/pipeline_test.exs4
-rw-r--r--test/web/activity_pub/side_effects_test.exs5
2 files changed, 4 insertions, 5 deletions
diff --git a/test/web/activity_pub/pipeline_test.exs b/test/web/activity_pub/pipeline_test.exs
index 202b5fe61..f2a231eaf 100644
--- a/test/web/activity_pub/pipeline_test.exs
+++ b/test/web/activity_pub/pipeline_test.exs
@@ -14,10 +14,10 @@ defmodule Pleroma.Web.ActivityPub.PipelineTest do
:ok
end
- test "when given an `embedded_object` in meta, Federation will receive a the original activity with the `object` field set to this embedded object" do
+ test "when given an `object_data` in meta, Federation will receive a the original activity with the `object` field set to this embedded object" do
activity = insert(:note_activity)
object = %{"id" => "1", "type" => "Love"}
- meta = [local: true, embedded_object: object]
+ meta = [local: true, object_data: object]
activity_with_object = %{activity | data: Map.put(activity.data, "object", object)}
diff --git a/test/web/activity_pub/side_effects_test.exs b/test/web/activity_pub/side_effects_test.exs
index d48c235c0..4a08eb7ee 100644
--- a/test/web/activity_pub/side_effects_test.exs
+++ b/test/web/activity_pub/side_effects_test.exs
@@ -312,13 +312,12 @@ defmodule Pleroma.Web.ActivityPub.SideEffectsTest do
}
end
- test "deletes the original block, but sets `embedded_object`", %{
+ test "deletes the original block", %{
block_undo: block_undo,
block: block
} do
- {:ok, _block_undo, meta} = SideEffects.handle(block_undo)
+ {:ok, _block_undo, _meta} = SideEffects.handle(block_undo)
- assert meta[:embedded_object] == block.data
refute Activity.get_by_id(block.id)
end