mirror of https://github.com/zulip/zulip.git
unsubscribe: Use a custom confirmation error page.
Reverts a bit of 6e02ce8
.
This commit is contained in:
parent
c2f1f54190
commit
1823d46236
|
@ -1107,10 +1107,9 @@ class EmailUnsubscribeTests(ZulipTestCase):
|
|||
def test_error_unsubscribe(self):
|
||||
# type: () -> None
|
||||
|
||||
# An invalid insubscribe token "test123" produces an error, in this
|
||||
# case, a link malformed error.
|
||||
# An invalid unsubscribe token "test123" produces an error.
|
||||
result = self.client_get('/accounts/unsubscribe/missed_messages/test123')
|
||||
self.assert_in_response('Make sure you copied the link', result)
|
||||
self.assert_in_response('Unknown email unsubscribe request', result)
|
||||
|
||||
# An unknown message type "fake" produces an error.
|
||||
user_profile = self.example_user('hamlet')
|
||||
|
|
|
@ -15,7 +15,7 @@ def process_unsubscribe(request: HttpRequest, confirmation_key: str, subscriptio
|
|||
try:
|
||||
user_profile = get_object_from_key(confirmation_key, Confirmation.UNSUBSCRIBE)
|
||||
except ConfirmationKeyException as exception:
|
||||
return render_confirmation_key_error(request, exception)
|
||||
return render(request, 'zerver/unsubscribe_link_error.html')
|
||||
|
||||
unsubscribe_function(user_profile)
|
||||
context = common_context(user_profile)
|
||||
|
|
Loading…
Reference in New Issue