diff --git a/totem/email/templates/email/email_viewer.html b/totem/email/templates/email/email_viewer.html index baaa6e48..2202c460 100644 --- a/totem/email/templates/email/email_viewer.html +++ b/totem/email/templates/email/email_viewer.html @@ -2,11 +2,12 @@

Text

{{ text }} +{% if debug %} +{% endif %} diff --git a/totem/email/tests.py b/totem/email/tests.py index a94285ee..2b445659 100644 --- a/totem/email/tests.py +++ b/totem/email/tests.py @@ -71,3 +71,14 @@ def test_returning_users(self, client, db): assert email.to == [user.email] message = str(email.message()) assert "http://testserver/" in message + + def test_returning_users_after_login(self, client, db): + user = UserFactory() + user.save() + client.force_login(user) + send_returning_login_email(user.email, reverse("pages:home")) + assert len(mail.outbox) == 1 + email = mail.outbox[0] + assert email.to == [user.email] + message = str(email.message()) + assert "http://testserver/" in message