mirror of https://github.com/zulip/zulip.git
tests: Move URL redirect tests for portico landing pages.
Moves three URL redirect tests in `zerver/tests/test_docs.py` to the unit test for URL redirects in `zerver/tests/test_urls.py`.
This commit is contained in:
parent
39a3944951
commit
9ad6457f32
|
@ -188,17 +188,6 @@ class DocPageTest(ZulipTestCase):
|
|||
)
|
||||
self.assertEqual(result.status_code, 404)
|
||||
|
||||
result = self.client_get("/new-user/")
|
||||
self.assertEqual(result.status_code, 301)
|
||||
self.assertIn("hello", result["Location"])
|
||||
|
||||
result = self.client_get("/developer-community/")
|
||||
self.assertEqual(result.status_code, 301)
|
||||
self.assertIn("development-community", result["Location"])
|
||||
|
||||
result = self.client_get("/for/companies/", follow=True)
|
||||
self.assert_in_success_response(["Communication efficiency represents"], result)
|
||||
|
||||
def test_open_organizations_endpoint(self) -> None:
|
||||
realm = get_realm("zulip")
|
||||
realm.want_advertise_in_communities_directory = True
|
||||
|
|
|
@ -182,3 +182,7 @@ class RedirectURLTest(ZulipTestCase):
|
|||
for redirect in LANDING_PAGE_REDIRECTS:
|
||||
result = self.client_get(redirect.old_url, follow=True)
|
||||
self.assert_in_success_response(["Download"], result)
|
||||
|
||||
result = self.client_get(redirect.old_url)
|
||||
self.assertEqual(result.status_code, 301)
|
||||
self.assertIn(redirect.new_url, result["Location"])
|
||||
|
|
Loading…
Reference in New Issue