Commits

James Bennett committed 0282434

Add one more test on registration.

  • Participants
  • Parent commits ef0a888

Comments (0)

Files changed (1)

File registration/tests.py

 
     def test_registration(self):
         """
-        Create a new user, verifying that username, email and password
-        are set correctly and that the new user is inactive and
-        received an activation email.
+        Test the registration process: registration creates a new
+        inactive account and a new profile with activation key,
+        populates the correct account data and sends 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(RegistrationProfile.objects.count(), 1)
         self.assertEqual(len(mail.outbox), 1)
 
     def test_activation(self):