mirror of
https://github.com/plausible/analytics.git
synced 2024-12-03 15:03:06 +03:00
Revert async where env is relied upon
This commit is contained in:
parent
4768ca2edd
commit
b7098f6da6
@ -1,5 +1,5 @@
|
|||||||
defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
|
defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
|
||||||
use PlausibleWeb.ConnCase, async: true
|
use PlausibleWeb.ConnCase, async: false
|
||||||
use Plausible.Repo
|
use Plausible.Repo
|
||||||
|
|
||||||
setup %{conn: conn} do
|
setup %{conn: conn} do
|
||||||
@ -62,7 +62,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
|
|||||||
end
|
end
|
||||||
|
|
||||||
test "does not allow creating more sites than the limit", %{conn: conn, user: user} do
|
test "does not allow creating more sites than the limit", %{conn: conn, user: user} do
|
||||||
Application.put_env(:plausible, :site_limit, 3)
|
patch_env(:site_limit, 3)
|
||||||
insert(:site, members: [user])
|
insert(:site, members: [user])
|
||||||
insert(:site, members: [user])
|
insert(:site, members: [user])
|
||||||
insert(:site, members: [user])
|
insert(:site, members: [user])
|
||||||
|
@ -7,10 +7,7 @@ defmodule PlausibleWeb.FirewallTest do
|
|||||||
@blocked_ip "127.0.0.2"
|
@blocked_ip "127.0.0.2"
|
||||||
@opts [blocklist: [@blocked_ip]]
|
@opts [blocklist: [@blocked_ip]]
|
||||||
|
|
||||||
setup do
|
setup_patch_env(PlausibleWeb.Firewall, blocklist: [@blocked_ip])
|
||||||
Application.put_env(:plausible, PlausibleWeb.Firewall, blocklist: [@blocked_ip])
|
|
||||||
:ok
|
|
||||||
end
|
|
||||||
|
|
||||||
test "ignores request if IP is allowed" do
|
test "ignores request if IP is allowed" do
|
||||||
conn =
|
conn =
|
||||||
|
Loading…
Reference in New Issue
Block a user