Add tests for mismatched context in replies
This commit is contained in:
parent
5a4e3aa715
commit
2d77976305
5 changed files with 149 additions and 0 deletions
|
|
@ -107,6 +107,17 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
|||
assert activity.data["target"] == new_user.ap_id
|
||||
assert activity.data["type"] == "Move"
|
||||
end
|
||||
|
||||
test "a reply with mismatched context is rejected" do
|
||||
insert(:user, ap_id: "https://macgirvin.com/channel/mike")
|
||||
|
||||
note_activity =
|
||||
"test/fixtures/roadhouse-create-activity.json"
|
||||
|> File.read!()
|
||||
|> Jason.decode!()
|
||||
|
||||
assert {:error, _} = Transmogrifier.handle_incoming(note_activity)
|
||||
end
|
||||
end
|
||||
|
||||
describe "prepare outgoing" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue