mirror of https://github.com/zulip/zulip.git
tests: Move test for non-existent integration to integration doc test.
Moves test for a non-existent integration to the specific test for integration doc endpoints.
This commit is contained in:
parent
9ad6457f32
commit
17974cafbc
|
@ -181,13 +181,6 @@ class DocPageTest(ZulipTestCase):
|
||||||
self._test("/errors/5xx/", "Internal server error")
|
self._test("/errors/5xx/", "Internal server error")
|
||||||
self._test("/emails/", "manually generate most of the emails by clicking")
|
self._test("/emails/", "manually generate most of the emails by clicking")
|
||||||
|
|
||||||
result = self.client_get(
|
|
||||||
"/integrations/doc-html/nonexistent_integration",
|
|
||||||
follow=True,
|
|
||||||
HTTP_X_REQUESTED_WITH="XMLHttpRequest",
|
|
||||||
)
|
|
||||||
self.assertEqual(result.status_code, 404)
|
|
||||||
|
|
||||||
def test_open_organizations_endpoint(self) -> None:
|
def test_open_organizations_endpoint(self) -> None:
|
||||||
realm = get_realm("zulip")
|
realm = get_realm("zulip")
|
||||||
realm.want_advertise_in_communities_directory = True
|
realm.want_advertise_in_communities_directory = True
|
||||||
|
@ -225,6 +218,13 @@ class DocPageTest(ZulipTestCase):
|
||||||
url = f"/integrations/doc-html/{integration}"
|
url = f"/integrations/doc-html/{integration}"
|
||||||
self._test(url, "", doc_html_str=True)
|
self._test(url, "", doc_html_str=True)
|
||||||
|
|
||||||
|
result = self.client_get(
|
||||||
|
"/integrations/doc-html/nonexistent_integration",
|
||||||
|
follow=True,
|
||||||
|
HTTP_X_REQUESTED_WITH="XMLHttpRequest",
|
||||||
|
)
|
||||||
|
self.assertEqual(result.status_code, 404)
|
||||||
|
|
||||||
def test_integration_pages_open_graph_metadata(self) -> None:
|
def test_integration_pages_open_graph_metadata(self) -> None:
|
||||||
url = "/integrations/doc/github"
|
url = "/integrations/doc/github"
|
||||||
title = '<meta property="og:title" content="Connect GitHub to Zulip" />'
|
title = '<meta property="og:title" content="Connect GitHub to Zulip" />'
|
||||||
|
|
Loading…
Reference in New Issue