aboutsummaryrefslogtreecommitdiff
path: root/test/object
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-11-10 11:32:50 +0000
committerlain <lain@soykaf.club>2019-11-10 11:32:50 +0000
commita88e834dbadcd3485a6187d512865ab95bb9c1f0 (patch)
tree15f0d2449c7dc39337d725d74e6b097fc6256ddb /test/object
parentb22ee9d9666c49d1a3b1757b275e9d303eed4afc (diff)
parent3a1aaadc18372fb8c76fa72cd20ed65dd85b2326 (diff)
downloadpleroma-a88e834dbadcd3485a6187d512865ab95bb9c1f0.tar.gz
Merge branch 'develop' into 'reactions'
# Conflicts: # CHANGELOG.md
Diffstat (limited to 'test/object')
-rw-r--r--test/object/containment_test.exs14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/object/containment_test.exs b/test/object/containment_test.exs
index 0dc2728b9..71fe5204c 100644
--- a/test/object/containment_test.exs
+++ b/test/object/containment_test.exs
@@ -67,6 +67,20 @@ defmodule Pleroma.Object.ContainmentTest do
end) =~
"[error] Could not decode user at fetch https://n1u.moe/users/rye"
end
+
+ test "contain_origin_from_id() gracefully handles cases where no ID is present" do
+ data = %{
+ "type" => "Create",
+ "object" => %{
+ "id" => "http://example.net/~alyssa/activities/1234",
+ "attributedTo" => "http://example.org/~alyssa"
+ },
+ "actor" => "http://example.com/~bob"
+ }
+
+ :error =
+ Containment.contain_origin_from_id("http://example.net/~alyssa/activities/1234", data)
+ end
end
describe "containment of children" do