diff options
author | Mark Felder <feld@feld.me> | 2024-08-07 14:04:20 -0400 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2024-08-07 14:04:20 -0400 |
commit | d2d07bfe4b9f1567c205a736e6e81e02d13598c1 (patch) | |
tree | 1354a7308493c4924048817f635d61250451ba03 | |
parent | 45611ed3255035845194d37cf1acd5d35f77a164 (diff) | |
download | pleroma-d2d07bfe4b9f1567c205a736e6e81e02d13598c1.tar.gz pleroma-d2d07bfe4b9f1567c205a736e6e81e02d13598c1.zip |
Add test for Follow objects with a cc
-rw-r--r-- | test/pleroma/web/activity_pub/object_validators/follow_validation_test.exs | 10 |
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..e684042a1 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_nil_cc = Map.put(valid_follow, "cc", []) + assert {:ok, _follow, []} = ObjectValidator.validate(valid_follow_with_nil_cc, []) + end end end |