summaryrefslogtreecommitdiff
path: root/test/object/containment_test.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-11-15 21:40:14 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-11-15 21:40:14 +0300
commit01d9c093c3fa06784ee24039c69b16e400dd0ebf (patch)
treead013076e4b54a242fd895550a0fe50a1786f9b9 /test/object/containment_test.exs
parentc31ddce51ea18f052c1c3ad30a221b77c7a94e71 (diff)
parent22554ac5ca056c2db627fc2daa5ffc8710be5c89 (diff)
downloadpleroma-01d9c093c3fa06784ee24039c69b16e400dd0ebf.tar.gz
pleroma-01d9c093c3fa06784ee24039c69b16e400dd0ebf.zip
Merge remote-tracking branch 'remotes/upstream/develop' into 1335-user-api-id-fields-relations
Diffstat (limited to 'test/object/containment_test.exs')
-rw-r--r--test/object/containment_test.exs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/object/containment_test.exs b/test/object/containment_test.exs
index 71fe5204c..7636803a6 100644
--- a/test/object/containment_test.exs
+++ b/test/object/containment_test.exs
@@ -17,6 +17,16 @@ defmodule Pleroma.Object.ContainmentTest do
end
describe "general origin containment" do
+ test "works for completely actorless posts" do
+ assert :error ==
+ Containment.contain_origin("https://glaceon.social/users/monorail", %{
+ "deleted" => "2019-10-30T05:48:50.249606Z",
+ "formerType" => "Note",
+ "id" => "https://glaceon.social/users/monorail/statuses/103049757364029187",
+ "type" => "Tombstone"
+ })
+ end
+
test "contain_origin_from_id() catches obvious spoofing attempts" do
data = %{
"id" => "http://example.com/~alyssa/activities/1234.json"