emails: Update text for password_reset.

Note that a pretty common use case for this is a realm admin sending this to
everyone after an import from HipChat or Slack. So this adds the realm_name
to the title (so that there is something they might recognize) and kept the
wording generic enough to accommodate the user not having clicked anything
to get this email.

Also strengthens the tests a bit to better test the complicated template
logic.
This commit is contained in:
Rishi Gupta
2018-12-20 00:44:18 -08:00
parent 2da0cb7a44
commit 0844c9a6ec
7 changed files with 57 additions and 51 deletions

View File

@@ -286,7 +286,7 @@ class TestPasswordRestEmail(ZulipTestCase):
self.assertIn("Zulip Account Security", from_email)
tokenized_no_reply_email = parseaddr(from_email)[1]
self.assertTrue(re.search(self.TOKENIZED_NOREPLY_REGEX, tokenized_no_reply_email))
self.assertIn("Psst. Word on the street is that you", outbox[0].body)
self.assertIn("reset your password", outbox[0].body)
class TestRealmReactivationEmail(ZulipTestCase):
COMMAND_NAME = "send_realm_reactivation_email"