mirror of https://github.com/zulip/zulip.git
test-backend: Raise zerver/views/unsubscribe.py test coverage to 100%.
This commit is contained in:
parent
9e0d3262bb
commit
cebc67f9b0
|
@ -99,7 +99,6 @@ not_yet_fully_covered = {
|
|||
'zerver/views/integrations.py',
|
||||
'zerver/views/messages.py',
|
||||
'zerver/views/report.py',
|
||||
'zerver/views/unsubscribe.py',
|
||||
'zerver/views/zephyr.py',
|
||||
'zerver/views/invite.py',
|
||||
'zerver/views/home.py',
|
||||
|
|
|
@ -690,9 +690,17 @@ class InviteeEmailsParserTests(TestCase):
|
|||
class EmailUnsubscribeTests(ZulipTestCase):
|
||||
def test_error_unsubscribe(self):
|
||||
# type: () -> None
|
||||
|
||||
# An invalid insubscribe token "test123" produces an error.
|
||||
result = self.client_get('/accounts/unsubscribe/missed_messages/test123')
|
||||
self.assert_in_response('Unknown email unsubscribe request', result)
|
||||
|
||||
# An unknown message type "fake" produces an error.
|
||||
user_profile = get_user_profile_by_email("hamlet@zulip.com")
|
||||
unsubscribe_link = one_click_unsubscribe_link(user_profile, "fake")
|
||||
result = self.client_get(urllib.parse.urlparse(unsubscribe_link).path)
|
||||
self.assert_in_response('Unknown email unsubscribe request', result)
|
||||
|
||||
def test_missedmessage_unsubscribe(self):
|
||||
# type: () -> None
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue