Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
create-channel: Add test for invalid user ID in subscribers param.
Lauryn Menarde5514d575db7
diff --git a/zerver/tests/test_channel_creation.py b/zerver/tests/test_channel_creation.pyindex 0563f87bf6a..06e317d067c 100644--- a/zerver/tests/test_channel_creation.py+++ b/zerver/tests/test_channel_creation.py@@ -330,13 +330,20 @@ class TestCreateStreams(ZulipTestCase):user_profile,"/api/v1/channels/create",post_data,- intentionally_undocumented=True,)self.assert_json_success(result)stream = get_stream("no-sub-channel", user_profile.realm)self.assertEqual(stream.name, "no-sub-channel")self.assertEqual(stream.subscriber_count, 0)+ # Test creating channel with invalid user ID.+ result = self.create_channel_via_post(+ user_profile,+ name="invalid-user-channel",+ subscribers=[12, 1000],+ )+ self.assert_json_error(result, "No such user")+def test_channel_creation_miscellaneous(self) -> None:iago = self.example_user("iago")desdemona = self.example_user("desdemona")