Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions test/plausible_web/controllers/site_controller_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,26 @@ defmodule PlausibleWeb.SiteControllerTest do
insert(:spike_notification, site: site)
insert(:drop_notification, site: site)

on_ee do
{:ok, g1} = Plausible.Goals.create(site, %{"page_path" => "/1"})
{:ok, g2} = Plausible.Goals.create(site, %{"event_name" => "/2"})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{:ok, g2} = Plausible.Goals.create(site, %{"event_name" => "/2"})
{:ok, g2} = Plausible.Goals.create(site, %{"event_name" => "Signup"})

a bit more realistic

{:ok, [g1, g2]}

{:ok, _} =
Plausible.Funnels.create(
site,
"funnel1",
[%{"goal_id" => g1.id}, %{"goal_id" => g2.id}]
)

{:ok, _} =
Plausible.Funnels.create(
site,
"funnel2",
[%{"goal_id" => g2.id}, %{"goal_id" => g1.id}]
)
end

delete(conn, "/#{site.domain}")

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