From 1b53c81351b1d952e666e5a8d3ff43d6fb059d07 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sat, 19 Mar 2022 15:16:20 -0700 Subject: [PATCH] Updates tests --- bookwyrm/templates/confirm_email/resend.html | 2 +- bookwyrm/tests/views/landing/test_register.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/bookwyrm/templates/confirm_email/resend.html b/bookwyrm/templates/confirm_email/resend.html index 0b5ded068..221f07565 100644 --- a/bookwyrm/templates/confirm_email/resend.html +++ b/bookwyrm/templates/confirm_email/resend.html @@ -6,5 +6,5 @@ {% endblock %} {% block content %} -{% include "confirm_email/resend_modal.html" with active=True static=True %} +{% include "confirm_email/resend_modal.html" with active=True static=True id="resend-modal" %} {% endblock %} diff --git a/bookwyrm/tests/views/landing/test_register.py b/bookwyrm/tests/views/landing/test_register.py index dd2c5e971..24360a646 100644 --- a/bookwyrm/tests/views/landing/test_register.py +++ b/bookwyrm/tests/views/landing/test_register.py @@ -360,10 +360,17 @@ class RegisterViews(TestCase): result = view(request) validate_html(result.render()) - def test_resend_link(self, *_): + def test_resend_link_get(self, *_): + """try again""" + request = self.factory.get("") + request.user = self.anonymous_user + result = views.ResendConfirmEmail.as_view()(request) + validate_html(result.render()) + + def test_resend_link_post(self, *_): """try again""" request = self.factory.post("", {"email": "mouse@mouse.com"}) request.user = self.anonymous_user with patch("bookwyrm.emailing.send_email.delay") as mock: - views.resend_link(request) + views.ResendConfirmEmail.as_view()(request) self.assertEqual(mock.call_count, 1)