mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +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:
|
||||
result = self.client_post("/activity/support", {"realm_id": "1", "plan_type": "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:
|
||||
cordelia_email = self.example_email("cordelia")
|
||||
|
||||
@@ -1041,8 +1041,9 @@ def support(request: HttpRequest) -> HttpResponse:
|
||||
new_plan_type = int(new_plan_type)
|
||||
current_plan_type = realm.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),
|
||||
get_plan_name(current_plan_type))
|
||||
msg = "Plan type of {} changed from {} to {} ".format(realm.name,
|
||||
get_plan_name(current_plan_type),
|
||||
get_plan_name(new_plan_type))
|
||||
context["message"] = msg
|
||||
|
||||
new_discount = request.POST.get("discount", None)
|
||||
|
||||
Reference in New Issue
Block a user