confirmation: Delete rendundant confirmation_link_expired_error page.

This template provides nothing that link_expired.html does not and is
redundant.
This commit is contained in:
Mateusz Mandera 2021-12-02 17:55:25 +01:00 committed by Tim Abbott
parent 4a030f616f
commit 39ce424fd5
3 changed files with 5 additions and 17 deletions

View File

@ -1,14 +0,0 @@
{% extends "zerver/portico_signup.html" %}
{% block portico_content %}
<div class="app portico-page">
<div class="app-main portico-page-container center-block flex full-page account-creation new-style">
<div class="inline-block">
<div class="app-main white-box">
<h1>{{ _("The registration link has expired or is not valid.") }}</h1>
<a href="{{ login_url }}">{{ _("Log in") }}</a>.
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -2115,7 +2115,7 @@ so we didn't send them an invitation. We did send invitations to everyone else!"
"""Since the key is a param input by the user to the registration endpoint,
if it inserts an invalid value, the confirmation object won't be found. This
tests if, in that scenario, we handle the exception by redirecting the user to
the confirmation_link_expired_error page.
the link_expired page.
"""
email = self.nonreg_email("alice")
password = "password"
@ -3980,7 +3980,9 @@ class UserSignUpTest(InviteUserBase):
)
# Error page should be displayed
self.assertEqual(result.status_code, 404)
self.assert_in_response("The registration link has expired or is not valid.", result)
self.assert_in_response(
"Whoops. The confirmation link has expired or been deactivated.", result
)
def test_signup_with_multiple_default_stream_groups(self) -> None:
# Check if user is subscribed to the streams of default

View File

@ -132,7 +132,7 @@ def check_prereg_key(
return render_confirmation_key_error(request, exception)
if prereg_user.status == confirmation_settings.STATUS_REVOKED:
return render(request, "zerver/confirmation_link_expired_error.html", status=404)
return render(request, "confirmation/link_expired.html", status=404)
return prereg_user