urls: Generate narrow links in backend with "channel" operator.

This commit is contained in:
Lauryn Menard
2024-10-04 16:54:16 +02:00
committed by Tim Abbott
parent 240c4d85ae
commit 70ab893d34
12 changed files with 53 additions and 53 deletions

View File

@@ -4747,9 +4747,9 @@ class GoogleAuthBackendTest(SocialAuthBase):
self.assertEqual(res.status_code, 302)
self.assertEqual(res["Location"], "http://zulip.testserver/user_uploads/path_to_image")
res = test_redirect_to_next_url("/#narrow/stream/7-test-here")
res = test_redirect_to_next_url("/#narrow/channel/7-test-here")
self.assertEqual(res.status_code, 302)
self.assertEqual(res["Location"], "http://zulip.testserver/#narrow/stream/7-test-here")
self.assertEqual(res["Location"], "http://zulip.testserver/#narrow/channel/7-test-here")
def test_log_into_subdomain_when_token_is_malformed(self) -> None:
data: ExternalAuthDataDict = {
@@ -5600,7 +5600,7 @@ class TestDevAuthBackend(ZulipTestCase):
# to the backend. Rather we depend upon the browser's behaviour of persisting
# hash anchors in between redirect requests. See below stackoverflow conversation
# https://stackoverflow.com/questions/5283395/url-hash-is-persisting-between-redirects
res = do_local_login("/accounts/login/local/?next=#narrow/stream/7-test-here")
res = do_local_login("/accounts/login/local/?next=#narrow/channel/7-test-here")
self.assertEqual(res.status_code, 302)
self.assertEqual(res["Location"], "http://zulip.testserver")