Skip to content

Commit

Permalink
[Feature #145028639] Fix the test to assert contents of the email.
Browse files Browse the repository at this point in the history
- Fixed the assertion to confirm the contents of the email.
	:pencil2:
  • Loading branch information
Andretalik committed May 17, 2017
1 parent e6ebcd3 commit a256563
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hc/accounts/tests/test_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ def test_it_sends_link(self):

r = self.client.post("/accounts/login/", form)
assert r.status_code == 302
### Assert that a user was created
### **Assert that a user was created
final_list = len(User.objects.all())
self.assertEqual(1, final_list)
# And email sent
self.assertEqual(len(mail.outbox), 1)
self.assertEqual(mail.outbox[0].subject, 'Log in to healthchecks.io')
### Assert contents of the email body

self.assertIn("please open the link below:", mail.outbox[0].body)
### Assert that check is associated with the new user

def test_it_pops_bad_link_from_session(self):
Expand Down

0 comments on commit a256563

Please sign in to comment.