From 5cd851ca4ea6f37fd6b742eb92eed7dcb6f3bb64 Mon Sep 17 00:00:00 2001 From: Jessica McKellar Date: Thu, 9 Jan 2014 11:36:04 -0500 Subject: [PATCH] Add a test for logging in with an invalid email address. (imported from commit 7d6bc16909e3f3ccaaf218809af6b430c938a671) --- zerver/tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zerver/tests.py b/zerver/tests.py index 43cd30dc93..b9da371680 100644 --- a/zerver/tests.py +++ b/zerver/tests.py @@ -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)]