Add site limit to enterprise upgrade plan

This commit is contained in:
Uku Taht 2022-01-24 15:03:45 -06:00
parent 52067803df
commit 0505de9b42
2 changed files with 13 additions and 1 deletions

View File

@ -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>

View File

@ -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 <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"
end
test "renders 404 is user does not have enterprise plan", %{conn: conn, user: user} do