test_signup: Test that cloning a system bot's email is not allowed.

Just now this is largely redundant with `test_signup_already_active`;
but very soon when we allow reusing an email across realms, the logic
will diverge.
This commit is contained in:
Greg Price 2017-11-27 17:49:50 -08:00
parent a753f49e6a
commit d6cfa56bc1
1 changed files with 10 additions and 0 deletions

View File

@ -1470,6 +1470,16 @@ class UserSignUpTest(ZulipTestCase):
result = self.client_get(result.url)
self.assert_in_response("You've already registered", result)
def test_signup_system_bot(self) -> None:
email = "notification-bot@zulip.com"
result = self.client_post('/accounts/home/', {'email': email}, subdomain="lear")
self.assertEqual(result.status_code, 302)
self.assertIn('login', result['Location'])
result = self.client_get(result.url)
# This is not really the right error message, but at least it's an error.
self.assert_in_response("You've already registered", result)
def test_signup_invalid_name(self) -> None:
"""
Check if an invalid name during signup is handled properly.