test_subs: Add send_new_subscription_messages parameter false test case.

For the sake of completion, we add a test case ensuring that
the response does not contain `new_subscription_messages_sent` if
the parameter `send_new_subscription_messages` is `false`,
as mentioned in the API documentation.
This commit is contained in:
Kislay Verma
2025-08-19 18:40:05 +05:30
committed by Tim Abbott
parent 18d9b686b7
commit 9b7d6335c1

View File

@@ -5171,6 +5171,17 @@ class SubscriptionAPITest(ZulipTestCase):
"```` quote\n*No description.*\n````",
)
response = self.subscribe_via_post(
desdemona,
["Test stream 3"],
dict(
principals=orjson.dumps(user_ids).decode(),
send_new_subscription_messages=orjson.dumps(False).decode(),
),
)
data = self.assert_json_success(response)
self.assertNotIn("new_subscription_messages_sent", data)
class InviteOnlyStreamTest(ZulipTestCase):
def test_must_be_subbed_to_send(self) -> None: