billing: Fix deleting next fixed-price plan via support.

If the customer has a current fixed-price plan and a support admin
configures a fixed-price plan for the upcoming billing year, then
a CustomerPlan object is created and not a CustomerPlanOffer.

Fix the support action for deleting a configured fixed-price next
plan.

Updates the success strings for these actions to be specify if the
deleted object was a plan offer or a scheduled plan.
This commit is contained in:
Lauryn Menard
2025-01-14 16:43:00 +01:00
committed by Tim Abbott
parent 06a776e7b6
commit e963d5eaa9
3 changed files with 40 additions and 10 deletions

View File

@@ -7730,7 +7730,7 @@ class TestRemoteRealmBillingFlow(StripeTestCase, RemoteRealmBillingTestCase):
support_type=SupportType.delete_fixed_price_next_plan,
)
success_message = billing_session.process_support_view_request(support_request)
self.assertEqual(success_message, "Fixed price offer deleted")
self.assertEqual(success_message, "Fixed-price plan offer deleted")
result = self.client_get("/activity/remote/support", {"q": "example.com"})
self.assert_not_in_success_response(["Next plan information:"], result)
self.assert_in_success_response(