Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Add site limit to enterprise upgrade plan
Uku Taht0505de9b42e3
diff --git a/lib/plausible_web/templates/billing/change_enterprise_plan.html.eex b/lib/plausible_web/templates/billing/change_enterprise_plan.html.eexindex fb7910ba56..e0f301816b 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 @@<ul class="w-full py-4 dark:text-gray-100"><li>Up to <b><%= PlausibleWeb.StatsView.large_number_format(@plan.monthly_pageview_limit) %></b> monthly pageviews</li>+ <li>Up to <b><%= PlausibleWeb.StatsView.large_number_format(@plan.site_limit) %></b> sites</li><li>Up to <b><%= PlausibleWeb.StatsView.large_number_format(@plan.hourly_api_request_limit) %></b> hourly api requests</li></ul>diff --git a/test/plausible_web/controllers/billing_controller_test.exs b/test/plausible_web/controllers/billing_controller_test.exsindex 8c0b408c03..43b60effe6 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 douser: user} doinsert(: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 <b>1k</b> monthly pageviews"+ assert html_response(conn, 200) =~ "Up to <b>500</b> hourly api requests"+ assert html_response(conn, 200) =~ "Up to <b>100</b> sites"endtest "renders 404 is user does not have enterprise plan", %{conn: conn, user: user} do