summaryrefslogtreecommitdiff
path: root/test/web
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-10-05 12:46:06 +0200
committerThibaut Girka <thib@sitedethib.com>2019-10-05 13:56:40 +0200
commitb1ff66dc5f0f3915152314677bcd2379be0dd43b (patch)
treec717400ef4e504c94fe40c73e59fec78cdcd2d8a /test/web
parent791d93ff0ecb304e3278b786e66689521e9ad19d (diff)
downloadpleroma-b1ff66dc5f0f3915152314677bcd2379be0dd43b.tar.gz
pleroma-b1ff66dc5f0f3915152314677bcd2379be0dd43b.zip
Add test for handling Announces with inlined object from different origin
Diffstat (limited to 'test/web')
-rw-r--r--test/web/activity_pub/transmogrifier_test.exs8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/web/activity_pub/transmogrifier_test.exs b/test/web/activity_pub/transmogrifier_test.exs
index d25334104..02f606709 100644
--- a/test/web/activity_pub/transmogrifier_test.exs
+++ b/test/web/activity_pub/transmogrifier_test.exs
@@ -461,6 +461,14 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
assert object.data["content"] == "this is a private toot"
end
+ test "it rejects incoming announces with an inlined activity from another origin" do
+ data =
+ File.read!("test/fixtures/bogus-mastodon-announce.json")
+ |> Poison.decode!()
+
+ assert :error = Transmogrifier.handle_incoming(data)
+ end
+
test "it does not clobber the addressing on announce activities" do
user = insert(:user)
{:ok, activity} = CommonAPI.post(user, %{"status" => "hey"})