Revert async where env is relied upon

This commit is contained in:
Adam Rutkowski 2022-12-23 14:02:40 +01:00
parent 4768ca2edd
commit b7098f6da6
2 changed files with 3 additions and 6 deletions

View File

@ -1,5 +1,5 @@
defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
use PlausibleWeb.ConnCase, async: true
use PlausibleWeb.ConnCase, async: false
use Plausible.Repo
setup %{conn: conn} do
@ -62,7 +62,7 @@ defmodule PlausibleWeb.Api.ExternalSitesControllerTest do
end
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])

View File

@ -7,10 +7,7 @@ defmodule PlausibleWeb.FirewallTest do
@blocked_ip "127.0.0.2"
@opts [blocklist: [@blocked_ip]]
setup do
Application.put_env(:plausible, PlausibleWeb.Firewall, blocklist: [@blocked_ip])
:ok
end
setup_patch_env(PlausibleWeb.Firewall, blocklist: [@blocked_ip])
test "ignores request if IP is allowed" do
conn =