AcceptValidation: Codify accept rules.
This commit is contained in:
parent
f1a0c10b17
commit
8b1e8bec2f
2 changed files with 26 additions and 1 deletions
|
|
@ -41,4 +41,15 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.AcceptValidationTest do
|
|||
|
||||
assert {:error, _} = ObjectValidator.validate(accept_data, [])
|
||||
end
|
||||
|
||||
test "for an accepted follow, it only validates if the actor of the accept is the followed actor",
|
||||
%{accept_data: accept_data} do
|
||||
stranger = insert(:user)
|
||||
|
||||
accept_data =
|
||||
accept_data
|
||||
|> Map.put("actor", stranger.ap_id)
|
||||
|
||||
assert {:error, _} = ObjectValidator.validate(accept_data, [])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue