2016-09-20 22:51:11 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
2016-11-10 19:30:09 +01:00
|
|
|
from zerver.lib.test_classes import WebhookTestCase
|
2016-09-20 22:51:11 +02:00
|
|
|
|
|
|
|
class CrashlyticsHookTests(WebhookTestCase):
|
|
|
|
STREAM_NAME = 'crashlytics'
|
|
|
|
URL_TEMPLATE = u"/api/v1/external/crashlytics?stream={stream}&api_key={api_key}"
|
|
|
|
FIXTURE_DIR_NAME = 'crashlytics'
|
|
|
|
|
2017-11-04 07:47:46 +01:00
|
|
|
def test_crashlytics_verification_message(self) -> None:
|
2017-04-06 08:11:44 +02:00
|
|
|
expected_subject = u"Setup"
|
|
|
|
expected_message = u"Webhook has been successfully configured."
|
|
|
|
self.send_and_test_stream_message('verification', expected_subject, expected_message)
|
2016-09-20 22:51:11 +02:00
|
|
|
|
2017-11-04 07:47:46 +01:00
|
|
|
def test_crashlytics_build_in_success_status(self) -> None:
|
2016-09-20 22:51:11 +02:00
|
|
|
expected_subject = u"123: Issue Title"
|
|
|
|
expected_message = u"[Issue](http://crashlytics.com/full/url/to/issue) impacts at least 16 device(s)."
|
|
|
|
self.send_and_test_stream_message('issue_message', expected_subject, expected_message)
|