Skip to content

Commit

Permalink
Added test for auto login after email confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
brosner committed Oct 18, 2016
1 parent c6f6b5a commit 676f428
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions account/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,20 @@ def test_post_not_required_redirect_override(self):
fetch_redirect_response=False
)

@override_settings(
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED=True,
ACCOUNT_EMAIL_CONFIRMATION_AUTO_LOGIN=True,
ACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL="/somewhere/",
)
def test_post_auto_login(self):
email_confirmation = self.signup()
response = self.client.post(reverse("account_confirm_email", kwargs={"key": email_confirmation.key}), {})
self.assertRedirects(
response,
settings.ACCOUNT_EMAIL_CONFIRMATION_AUTHENTICATED_REDIRECT_URL,
fetch_redirect_response=False
)


class ChangePasswordViewTestCase(TestCase):

Expand Down

0 comments on commit 676f428

Please sign in to comment.