mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
support: Update success message for plan type change.
This commit is contained in:
@@ -406,7 +406,7 @@ class TestSupportEndpoint(ZulipTestCase):
|
|||||||
with mock.patch("analytics.views.do_change_plan_type") as m:
|
with mock.patch("analytics.views.do_change_plan_type") as m:
|
||||||
result = self.client_post("/activity/support", {"realm_id": "1", "plan_type": "2"})
|
result = self.client_post("/activity/support", {"realm_id": "1", "plan_type": "2"})
|
||||||
m.assert_called_once_with(get_realm("zulip"), 2)
|
m.assert_called_once_with(get_realm("zulip"), 2)
|
||||||
self.assert_in_success_response(["Plan type of Zulip Dev changed to limited from self hosted"], result)
|
self.assert_in_success_response(["Plan type of Zulip Dev changed from self hosted to limited"], result)
|
||||||
|
|
||||||
def test_attach_discount(self) -> None:
|
def test_attach_discount(self) -> None:
|
||||||
cordelia_email = self.example_email("cordelia")
|
cordelia_email = self.example_email("cordelia")
|
||||||
|
|||||||
@@ -1041,8 +1041,9 @@ def support(request: HttpRequest) -> HttpResponse:
|
|||||||
new_plan_type = int(new_plan_type)
|
new_plan_type = int(new_plan_type)
|
||||||
current_plan_type = realm.plan_type
|
current_plan_type = realm.plan_type
|
||||||
do_change_plan_type(realm, new_plan_type)
|
do_change_plan_type(realm, new_plan_type)
|
||||||
msg = "Plan type of {} changed to {} from {} ".format(realm.name, get_plan_name(new_plan_type),
|
msg = "Plan type of {} changed from {} to {} ".format(realm.name,
|
||||||
get_plan_name(current_plan_type))
|
get_plan_name(current_plan_type),
|
||||||
|
get_plan_name(new_plan_type))
|
||||||
context["message"] = msg
|
context["message"] = msg
|
||||||
|
|
||||||
new_discount = request.POST.get("discount", None)
|
new_discount = request.POST.get("discount", None)
|
||||||
|
|||||||
Reference in New Issue
Block a user