mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
emails: Make it obvious when registering creates new realm.
Checked the email looked OK in `/emails` for both creating realm and registering within an existing one. Not sure zerver/tests/test_i18n.py test has been suppressed correctly. Fixes #17786.
This commit is contained in:
committed by
Tim Abbott
parent
bf179b7d2f
commit
e4d9e58c7d
@@ -649,6 +649,8 @@ Output:
|
||||
email_address: str,
|
||||
*,
|
||||
url_pattern: Optional[str] = None,
|
||||
email_subject_contains: Optional[str] = None,
|
||||
email_body_contains: Optional[str] = None,
|
||||
) -> str:
|
||||
from django.core.mail import outbox
|
||||
|
||||
@@ -661,6 +663,13 @@ Output:
|
||||
):
|
||||
match = re.search(url_pattern, message.body)
|
||||
assert match is not None
|
||||
|
||||
if email_subject_contains:
|
||||
self.assertIn(email_subject_contains, message.subject)
|
||||
|
||||
if email_body_contains:
|
||||
self.assertIn(email_body_contains, message.body)
|
||||
|
||||
[confirmation_url] = match.groups()
|
||||
return confirmation_url
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user