forked from GithubBackups/healthchecks
Change "foo@example.org is not available" message to "foo@example.org is already registed".
This commit is contained in:
parent
75fa27436e
commit
621e04e845
@ -39,7 +39,7 @@ class ChangeEmailForm(forms.Form):
|
||||
def clean_email(self):
|
||||
v = self.cleaned_data["email"]
|
||||
if User.objects.filter(email=v).exists():
|
||||
raise forms.ValidationError("%s is not available" % v)
|
||||
raise forms.ValidationError("%s is already registered" % v)
|
||||
|
||||
return v
|
||||
|
||||
|
@ -35,7 +35,7 @@ class ChangeEmailTestCase(BaseTestCase):
|
||||
|
||||
payload = {"email": "bob@example.org"}
|
||||
r = self.client.post("/accounts/change_email/foo/", payload)
|
||||
self.assertContains(r, "bob@example.org is not available")
|
||||
self.assertContains(r, "bob@example.org is already registered")
|
||||
|
||||
self.alice.refresh_from_db()
|
||||
self.assertEqual(self.alice.email, "alice@example.org")
|
||||
|
Loading…
x
Reference in New Issue
Block a user