mirror of
https://github.com/plausible/analytics.git
synced 2024-12-24 10:02:10 +03:00
Add test for conversion in month
This commit is contained in:
parent
29404816cb
commit
e0737849ba
@ -152,7 +152,7 @@ defmodule PlausibleWeb.Api.StatsController.MainGraphTest do
|
||||
insert(:event, name: "Signup", hostname: site.domain, user_id: @user_id, timestamp: ~N[2019-01-01 02:00:00])
|
||||
|
||||
filters = Jason.encode!(%{goal: "Signup"})
|
||||
conn = get(conn, "/api/stats/#{site.domain}/main-graph?period=day&date=2019-01-01&filters=#{filters}")
|
||||
conn = get(conn, "/api/stats/#{site.domain}/main-graph?period=month&date=2019-01-01&filters=#{filters}")
|
||||
|
||||
res = json_response(conn, 200)
|
||||
assert %{"name" => "Converted visitors", "count" => 1, "change" => 100} in res["top_stats"]
|
||||
|
Loading…
Reference in New Issue
Block a user