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 test for change plan page
Uku Taht9dd08ddfa670
diff --git a/test/plausible_web/controllers/billing_controller_test.exs b/test/plausible_web/controllers/billing_controller_test.exsindex 875d094e94..e5cfddf6d4 100644--- a/test/plausible_web/controllers/billing_controller_test.exs+++ b/test/plausible_web/controllers/billing_controller_test.exs@@ -5,6 +5,13 @@ defmodule PlausibleWeb.BillingControllerTest dodescribe "GET /change-plan" dosetup [:create_user, :log_in]+ test "shows change plan page if user has subsription", %{conn: conn, user: user} do+ insert(:subscription, user: user)+ conn = get(conn, "/billing/change-plan")++ assert html_response(conn, 200) =~ "Change subscription plan"+ end+test "redirects to /upgrade if user does not have a subscription", %{conn: conn} doconn = get(conn, "/billing/change-plan")