Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
web: Save a 301 redirect from /billing to /billing/.
Alex Vandiverab7ff6b582e5
diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.pyindex fa961ef3e81..fd7c0fc811c 100644--- a/corporate/tests/test_stripe.py+++ b/corporate/tests/test_stripe.py@@ -848,7 +848,7 @@ class StripeTest(StripeTestCase):self.assertEqual(response.status_code, 302)self.assertEqual("/billing/", response["Location"])- # Check /billing has the correct information+ # Check /billing/ has the correct informationwith patch("corporate.views.billing_page.timezone_now", return_value=self.now):response = self.client_get("/billing/")self.assert_not_in_success_response(["Pay annually"], response)@@ -989,7 +989,7 @@ class StripeTest(StripeTestCase):self.assertEqual(response.status_code, 302)self.assertEqual("/billing/", response["Location"])- # Check /billing has the correct information+ # Check /billing/ has the correct informationwith patch("corporate.views.billing_page.timezone_now", return_value=self.now):response = self.client_get("/billing/")self.assert_not_in_success_response(["Pay annually", "Update card"], response)diff --git a/templates/corporate/pricing_model.html b/templates/corporate/pricing_model.htmlindex f9c2590352c..184b04d94f6 100644--- a/templates/corporate/pricing_model.html+++ b/templates/corporate/pricing_model.html@@ -88,7 +88,7 @@{% endif %}</a>{% elif sponsorship_pending %}- <a href="/billing" class="button black-current-value" type="button">+ <a href="/billing/" class="button black-current-value" type="button">Sponsorship pending</a>{% else %}diff --git a/web/src/billing/billing.js b/web/src/billing/billing.jsindex bd982a4798a..3f71a74c7cc 100644--- a/web/src/billing/billing.js+++ b/web/src/billing/billing.js@@ -8,7 +8,7 @@ export function create_update_license_request() {"licensechange",["licenses_at_next_renewal"],"PATCH",- () => window.location.replace("/billing"),+ () => window.location.replace("/billing/"),);}@@ -56,13 +56,13 @@ export function initialize() {"licensechange",["licenses"],"PATCH",- () => window.location.replace("/billing"),+ () => window.location.replace("/billing/"),);});$("#change-plan-status").on("click", (e) => {helpers.create_ajax_request("/json/billing/plan", "planchange", [], "PATCH", () =>- window.location.replace("/billing"),+ window.location.replace("/billing/"),);e.preventDefault();});diff --git a/web/src/billing/event_status.js b/web/src/billing/event_status.jsindex 4d372114386..cbc9aeba575 100644--- a/web/src/billing/event_status.js+++ b/web/src/billing/event_status.js@@ -37,7 +37,7 @@ function handle_session_complete_event(session) {case "free_trial_upgrade_from_billing_page":message ="Your free trial of Zulip Cloud Standard has been activated. You would be redirected to the billing page soon.";- redirect_to = "/billing";+ redirect_to = "/billing/";break;case "free_trial_upgrade_from_onboarding_page":message =diff --git a/web/src/billing/upgrade.js b/web/src/billing/upgrade.jsindex b7ecc22f222..9c04f93a93d 100644--- a/web/src/billing/upgrade.js+++ b/web/src/billing/upgrade.js@@ -32,7 +32,7 @@ export const initialize = () => {}e.preventDefault();helpers.create_ajax_request("/json/billing/upgrade", "invoice", [], "POST", () =>- window.location.replace("/billing"),+ window.location.replace("/billing/"),);});diff --git a/web/templates/gear_menu.hbs b/web/templates/gear_menu.hbsindex 6f078da6881..ac8a0ec6884 100644--- a/web/templates/gear_menu.hbs+++ b/web/templates/gear_menu.hbs@@ -135,7 +135,7 @@</li>{{#if show_billing}}<li role="presentation" class="hidden-for-spectators">- <a href="/billing" target="_blank" rel="noopener noreferrer" role="menuitem">+ <a href="/billing/" target="_blank" rel="noopener noreferrer" role="menuitem"><i class="fa fa-credit-card" aria-hidden="true"></i> {{t 'Billing' }}</a></li>diff --git a/web/tests/billing.test.js b/web/tests/billing.test.jsindex fda4ceac2d0..faaf0226d1f 100644--- a/web/tests/billing.test.js+++ b/web/tests/billing.test.js@@ -66,7 +66,7 @@ run_test("planchange", ({override}) => {assert.deepEqual(ignored_inputs, []);assert.equal(method, "PATCH");location.replace = (new_location) => {- assert.equal(new_location, "/billing");+ assert.equal(new_location, "/billing/");};success_callback();create_ajax_request_called = true;@@ -89,7 +89,7 @@ run_test("licensechange", ({override}) => {assert.deepEqual(ignored_inputs, ["licenses_at_next_renewal"]);assert.equal(method, "PATCH");location.replace = (new_location) => {- assert.equal(new_location, "/billing");+ assert.equal(new_location, "/billing/");};success_callback();create_ajax_request_called = true;@@ -153,7 +153,7 @@ run_test("licensechange", ({override}) => {assert.deepEqual(ignored_inputs, ["licenses"]);assert.equal(method, "PATCH");location.replace = (new_location) => {- assert.equal(new_location, "/billing");+ assert.equal(new_location, "/billing/");};success_callback();create_ajax_request_called = true;diff --git a/web/tests/event_status.test.js b/web/tests/event_status.test.jsindex a3f5e33edfc..a9585450cfb 100644--- a/web/tests/event_status.test.js+++ b/web/tests/event_status.test.js@@ -139,7 +139,7 @@ run_test("check_status", async ({override}) => {set_global("window", {location: {replace(new_location) {- assert.equal(new_location, "/billing");+ assert.equal(new_location, "/billing/");},},});diff --git a/web/tests/upgrade.test.js b/web/tests/upgrade.test.jsindex 9cb0b033ff6..f4a8e28a3f9 100644--- a/web/tests/upgrade.test.js+++ b/web/tests/upgrade.test.js@@ -54,7 +54,7 @@ run_test("initialize", ({override_rewire}) => {assert.deepEqual(ignored_inputs, []);assert.equal(type, "POST");location.replace = (new_location) => {- assert.equal(new_location, "/billing");+ assert.equal(new_location, "/billing/");};success_callback();break;diff --git a/zerver/lib/markdown/help_relative_links.py b/zerver/lib/markdown/help_relative_links.pyindex 665dae633a9..80cce453fbc 100644--- a/zerver/lib/markdown/help_relative_links.py+++ b/zerver/lib/markdown/help_relative_links.py@@ -24,7 +24,7 @@ gear_info = {"integrations": ["Integrations", "/integrations/"],"stats": ["Usage statistics", "/stats"],"plans": ["Plans and pricing", "/plans/"],- "billing": ["Billing", "/billing"],+ "billing": ["Billing", "/billing/"],"invite": ["Invite users", "/#invite"],"about-zulip": ["About Zulip", "/#about-zulip"],}