diff options
author | lain <lain@soykaf.club> | 2020-08-11 15:32:00 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-08-11 15:32:52 +0200 |
commit | 8b1e8bec2ffcb3a73eea93015d73b44c4996baff (patch) | |
tree | 09540e1302364a5985f07d770eed82e3834b46e5 /test/web | |
parent | f1a0c10b17ff20a5ebbd070dc38aaedf82f8fe2e (diff) | |
download | pleroma-8b1e8bec2ffcb3a73eea93015d73b44c4996baff.tar.gz |
AcceptValidation: Codify accept rules.
Diffstat (limited to 'test/web')
-rw-r--r-- | test/web/activity_pub/object_validators/accept_validation_test.exs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/activity_pub/object_validators/accept_validation_test.exs b/test/web/activity_pub/object_validators/accept_validation_test.exs index 7f5dc14af..2d5d18046 100644 --- a/test/web/activity_pub/object_validators/accept_validation_test.exs +++ b/test/web/activity_pub/object_validators/accept_validation_test.exs @@ -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 |