Commit bc36d40b authored by kaniini's avatar kaniini

tests: add a testcase for verifying that objects without a valid ID are always rejected

parent 52b44184
......@@ -615,6 +615,18 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
assert User.following?(follower, followed) == false
test "it rejects activities without a valid ID" do
user = insert(:user)
data =!("test/fixtures/mastodon-follow-activity.json")
|> Poison.decode!()
|> Map.put("object", user.ap_id)
|> Map.put("id", "")
:error = Transmogrifier.handle_incoming(data)
describe "prepare outgoing" do
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment