aboutsummaryrefslogtreecommitdiff
path: root/test/web
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2020-05-13 09:20:25 +0300
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2020-05-13 11:38:22 +0300
commit12635bc15626dd7d2d4a02b9c8d763687a0d34ce (patch)
treec0c7870ef24f831f557cc91b1c08dc05fe9cdc5f /test/web
parentb962b24e6f984dbec0089c80b22fac8f4f9c1fa4 (diff)
downloadpleroma-12635bc15626dd7d2d4a02b9c8d763687a0d34ce.tar.gz
don't use global mocks in setup callbacks
Diffstat (limited to 'test/web')
-rw-r--r--test/web/mastodon_api/controllers/search_controller_test.exs2
-rw-r--r--test/web/push/impl_test.exs4
2 files changed, 3 insertions, 3 deletions
diff --git a/test/web/mastodon_api/controllers/search_controller_test.exs b/test/web/mastodon_api/controllers/search_controller_test.exs
index 02476acb6..8b9459735 100644
--- a/test/web/mastodon_api/controllers/search_controller_test.exs
+++ b/test/web/mastodon_api/controllers/search_controller_test.exs
@@ -13,7 +13,7 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
import Tesla.Mock
import Mock
- setup do
+ setup_all do
mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
:ok
end
diff --git a/test/web/push/impl_test.exs b/test/web/push/impl_test.exs
index b855d72ba..57b35061a 100644
--- a/test/web/push/impl_test.exs
+++ b/test/web/push/impl_test.exs
@@ -13,8 +13,8 @@ defmodule Pleroma.Web.Push.ImplTest do
import Pleroma.Factory
- setup_all do
- Tesla.Mock.mock_global(fn
+ setup do
+ Tesla.Mock.mock(fn
%{method: :post, url: "https://example.com/example/1234"} ->
%Tesla.Env{status: 200}