mirror of
https://github.com/plausible/analytics.git
synced 2024-09-11 18:07:33 +03:00
Add test for change plan page
This commit is contained in:
parent
396faa4bcd
commit
9dd08ddfa6
@ -5,6 +5,13 @@ defmodule PlausibleWeb.BillingControllerTest do
|
||||
describe "GET /change-plan" do
|
||||
setup [: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} do
|
||||
conn = get(conn, "/billing/change-plan")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user