Commits

James Bennett committed d0ba7df

Test email sending.

Comments (0)

Files changed (1)

registration/tests.py

 
 """
 
+from django.core import mail
 from django.test import TestCase
 
 
     def test_registration(self):
         """
         Create a new user, verifying that username, email and password
-        are set correctly and that the new user is inactive.
+        are set correctly and that the new user is inactive and
+        received an activation email.
         
         """
         new_user = self.backend.register({}, 'bob', 'secret', 'bob@example.com')
         self.failUnless(new_user.check_password('secret'))
         self.assertEqual(new_user.email, 'bob@example.com')
         self.failIf(new_user.is_active)
+        self.assertEqual(len(mail.outbox), 1)