diff --git a/bookwyrm/tests/models/test_fields.py b/bookwyrm/tests/models/test_fields.py index 2520a2fd2..80b78231c 100644 --- a/bookwyrm/tests/models/test_fields.py +++ b/bookwyrm/tests/models/test_fields.py @@ -185,6 +185,17 @@ class ModelFields(TestCase): instance.set_field_from_activity(model_instance, data) self.assertEqual(model_instance.privacy_field, "unlisted") + data.to = ["http://user_remote/followers"] + data.cc = [] + instance.set_field_from_activity(model_instance, data) + self.assertEqual(model_instance.privacy_field, "followers") + + data.to = ["http://user_remote/followers"] + data.cc = ["http://mentioned_user/remote_id"] + instance.set_field_from_activity(model_instance, data) + self.assertEqual(model_instance.privacy_field, "followers") + + @patch("bookwyrm.models.activitypub_mixin.ObjectMixin.broadcast") @patch("bookwyrm.activitystreams.ActivityStream.add_status") def test_privacy_field_set_activity_from_field(self, *_):