From 0505de9b42e38f054d631f4d861c63648d21fb50 Mon Sep 17 00:00:00 2001 From: Uku Taht Date: Mon, 24 Jan 2022 15:03:45 -0600 Subject: [PATCH] Add site limit to enterprise upgrade plan --- .../billing/change_enterprise_plan.html.eex | 1 + .../controllers/billing_controller_test.exs | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/plausible_web/templates/billing/change_enterprise_plan.html.eex b/lib/plausible_web/templates/billing/change_enterprise_plan.html.eex index fb7910ba5..e0f301816 100644 --- a/lib/plausible_web/templates/billing/change_enterprise_plan.html.eex +++ b/lib/plausible_web/templates/billing/change_enterprise_plan.html.eex @@ -38,6 +38,7 @@ diff --git a/test/plausible_web/controllers/billing_controller_test.exs b/test/plausible_web/controllers/billing_controller_test.exs index 8c0b408c0..43b60effe 100644 --- a/test/plausible_web/controllers/billing_controller_test.exs +++ b/test/plausible_web/controllers/billing_controller_test.exs @@ -76,10 +76,21 @@ defmodule PlausibleWeb.BillingControllerTest do user: user } do insert(:subscription, user: user) - plan = insert(:enterprise_plan, user: user) + + plan = + insert(:enterprise_plan, + user: user, + monthly_pageview_limit: 1000, + hourly_api_request_limit: 500, + site_limit: 100 + ) + conn = get(conn, "/billing/change-plan/enterprise/#{plan.id}") assert html_response(conn, 200) =~ "Change subscription plan" + assert html_response(conn, 200) =~ "Up to 1k monthly pageviews" + assert html_response(conn, 200) =~ "Up to 500 hourly api requests" + assert html_response(conn, 200) =~ "Up to 100 sites" end test "renders 404 is user does not have enterprise plan", %{conn: conn, user: user} do