You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
524 B

  1. from django.test.utils import override_settings
  2. from hc.test import BaseTestCase
  3. @override_settings(SLACK_CLIENT_ID="fake-client-id")
  4. class AddSlackHelpTestCase(BaseTestCase):
  5. def test_instructions_work(self):
  6. r = self.client.get("/integrations/add_slack/")
  7. self.assertContains(r, "Setup Guide", status_code=200)
  8. @override_settings(SLACK_CLIENT_ID=None)
  9. def test_it_requires_client_id(self):
  10. r = self.client.get("/integrations/add_slack/")
  11. self.assertEqual(r.status_code, 404)