mirror of
https://github.com/healthchecks/healthchecks.git
synced 2024-11-21 23:27:57 +00:00
b859a71920
I like "sign in" better, but users from time to time confuse "sign in" and "sign up" forms. To reduce confusion potential, I'm renaming "sign in" to "log in".
21 lines
738 B
Python
21 lines
738 B
Python
from __future__ import annotations
|
|
|
|
from django.test.utils import override_settings
|
|
|
|
from hc.test import BaseTestCase
|
|
|
|
|
|
@override_settings(MATTERMOST_ENABLED=True, SITE_NAME="Mychecks")
|
|
class AddMattermostHelpTestCase(BaseTestCase):
|
|
def test_instructions_work(self) -> None:
|
|
r = self.client.get("/integrations/mattermost/")
|
|
self.assertContains(r, "please log into Mychecks", status_code=200)
|
|
self.assertContains(
|
|
r, "click on <strong>Add Integration</strong>", status_code=200
|
|
)
|
|
|
|
@override_settings(MATTERMOST_ENABLED=False)
|
|
def test_it_requires_mattermost_enabled(self) -> None:
|
|
r = self.client.get("/integrations/mattermost/")
|
|
self.assertEqual(r.status_code, 404)
|