mirror of https://github.com/zulip/zulip.git
Add test_bulk_invite_users().
(imported from commit bc8ab756dae0fd82e73b5b2a9655974c5fc839b0)
This commit is contained in:
parent
d62ca820db
commit
94e3c02649
|
@ -2342,6 +2342,17 @@ class InviteUserTest(AuthedTestCase):
|
|||
email_recipients = [email.recipients()[0] for email in outbox]
|
||||
self.assertItemsEqual(email_recipients, correct_recipients)
|
||||
|
||||
def test_bulk_invite_users(self):
|
||||
# The bulk_invite_users code path is for the first user in a realm.
|
||||
self.login('hamlet@zulip.com')
|
||||
invitees = ['alice@zulip.com', 'bob@zulip.com']
|
||||
params = {
|
||||
'invitee_emails': ujson.dumps(invitees)
|
||||
}
|
||||
result = self.client.post('/json/bulk_invite_users', params)
|
||||
self.assert_json_success(result)
|
||||
self.check_sent_emails(invitees)
|
||||
|
||||
def test_successful_invite_user(self):
|
||||
"""
|
||||
A call to /json/invite_users with valid parameters causes an invitation
|
||||
|
|
Loading…
Reference in New Issue