summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2024-08-08 05:29:46 +0000
committerlain <lain@soykaf.club>2024-08-08 05:29:46 +0000
commit72b5974f81bcc8e1c7de517b5d9a01a52d9fae63 (patch)
treec23f45fc410c1e8d4bf96d91d53fe72c49f8f138 /test
parent45611ed3255035845194d37cf1acd5d35f77a164 (diff)
parentca934b744f9c6095315421990975c1e9a7b9cd85 (diff)
downloadpleroma-72b5974f81bcc8e1c7de517b5d9a01a52d9fae63.tar.gz
pleroma-72b5974f81bcc8e1c7de517b5d9a01a52d9fae63.zip
Merge branch 'follow-validator' into 'develop'
Do not require a cc field when validating an incoming Follow activity See merge request pleroma/pleroma!4212
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/activity_pub/object_validators/follow_validation_test.exs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/pleroma/web/activity_pub/object_validators/follow_validation_test.exs b/test/pleroma/web/activity_pub/object_validators/follow_validation_test.exs
index 371368e0e..acf6e8d8f 100644
--- a/test/pleroma/web/activity_pub/object_validators/follow_validation_test.exs
+++ b/test/pleroma/web/activity_pub/object_validators/follow_validation_test.exs
@@ -22,5 +22,15 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.FollowValidationTest do
test "validates a basic follow object", %{valid_follow: valid_follow} do
assert {:ok, _follow, []} = ObjectValidator.validate(valid_follow, [])
end
+
+ test "supports a nil cc", %{valid_follow: valid_follow} do
+ valid_follow_with_nil_cc = Map.put(valid_follow, "cc", nil)
+ assert {:ok, _follow, []} = ObjectValidator.validate(valid_follow_with_nil_cc, [])
+ end
+
+ test "supports an empty cc", %{valid_follow: valid_follow} do
+ valid_follow_with_empty_cc = Map.put(valid_follow, "cc", [])
+ assert {:ok, _follow, []} = ObjectValidator.validate(valid_follow_with_empty_cc, [])
+ end
end
end