mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 16:43:57 +00:00
test-signup: Confirm all invalid email field error messages.
In Django, when cleaning a form field, all validators are run on the field and all validation error messages are all collected. Updates our test for invalid email addresses when creating a new realm to confirm all expected error messages from the various validators that are run on that field.
This commit is contained in:
committed by
Tim Abbott
parent
f55c89a87f
commit
c2d008aadb
@@ -2073,11 +2073,14 @@ class RealmCreationTest(ZulipTestCase):
|
|||||||
email="<foo", realm_subdomain="custom-test", realm_name="Zulip test"
|
email="<foo", realm_subdomain="custom-test", realm_name="Zulip test"
|
||||||
)
|
)
|
||||||
self.assert_in_response("Please use your real email address.", result)
|
self.assert_in_response("Please use your real email address.", result)
|
||||||
|
self.assert_in_response("Enter a valid email address.", result)
|
||||||
|
|
||||||
result = self.submit_realm_creation_form(
|
result = self.submit_realm_creation_form(
|
||||||
email="foo\x00bar", realm_subdomain="custom-test", realm_name="Zulip test"
|
email="foo\x00bar", realm_subdomain="custom-test", realm_name="Zulip test"
|
||||||
)
|
)
|
||||||
self.assert_in_response("Please use your real email address.", result)
|
self.assert_in_response("Please use your real email address.", result)
|
||||||
|
self.assert_in_response("Null characters are not allowed.", result)
|
||||||
|
self.assert_in_response("Enter a valid email address.", result)
|
||||||
|
|
||||||
@override_settings(OPEN_REALM_CREATION=True)
|
@override_settings(OPEN_REALM_CREATION=True)
|
||||||
def test_mailinator_signup(self) -> None:
|
def test_mailinator_signup(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user