Add a test for logging in with an invalid email address.

(imported from commit 7d6bc16909e3f3ccaaf218809af6b430c938a671)
This commit is contained in:
Jessica McKellar
2014-01-09 11:36:04 -05:00
committed by Waseem Daher
parent 1352dccea5
commit 5cd851ca4e

View File

@@ -796,6 +796,10 @@ class LoginTest(AuthedTestCase):
self.login("hamlet@zulip.com", "wrongpassword")
self.assertIsNone(self.client.session.get('_auth_user_id', None))
def test_login_nonexist_user(self):
result = self.login("xxx@zulip.com", "xxx")
self.assertIn("Please enter a correct email and password", result.content)
def test_register(self):
realm = Realm.objects.get(domain="zulip.com")
streams = ["stream_%s" % i for i in xrange(40)]