Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResendEmailVerificationView requires queryset #309

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions dj_rest_auth/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,11 +587,13 @@ def test_registration_with_email_verification(self):
)

# resend email
mail_count = len(mail.outbox)
self.post(
self.resend_email_url,
data={'email': self.EMAIL},
status_code=status.HTTP_200_OK
)

# check mail count
self.assertEqual(len(mail.outbox), mail_count + 1)

Expand All @@ -604,6 +606,15 @@ def test_registration_with_email_verification(self):
status_code=status.HTTP_200_OK,
)

# resend email again
mail_count = len(mail.outbox)
self.post(
self.resend_email_url,
data={'email': self.EMAIL},
status_code=status.HTTP_200_OK
)
self.assertEqual(len(mail.outbox), mail_count)

# try to login again
self._login()
self._logout()
Expand Down