Skip to content

Commit 751062a

Browse files
committed
Update site deletion test with funnels
1 parent 9eb884e commit 751062a

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

test/plausible_web/controllers/site_controller_test.exs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,24 @@ defmodule PlausibleWeb.SiteControllerTest do
977977
insert(:spike_notification, site: site)
978978
insert(:drop_notification, site: site)
979979

980+
{:ok, g1} = Plausible.Goals.create(site, %{"page_path" => "/go/to/blog/**"})
981+
{:ok, g2} = Plausible.Goals.create(site, %{"event_name" => "Signup"})
982+
{:ok, [g1, g2]}
983+
984+
{:ok, _} =
985+
Plausible.Funnels.create(
986+
site,
987+
"funnel1",
988+
[%{"goal_id" => g1.id}, %{"goal_id" => g2.id}]
989+
)
990+
991+
{:ok, _} =
992+
Plausible.Funnels.create(
993+
site,
994+
"funnel2",
995+
[%{"goal_id" => g2.id}, %{"goal_id" => g1.id}]
996+
)
997+
980998
delete(conn, "/#{site.domain}")
981999

9821000
refute Repo.exists?(from(s in Plausible.Site, where: s.id == ^site.id))

0 commit comments

Comments
 (0)