diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-05-13 09:20:25 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-05-13 11:38:22 +0300 |
commit | 12635bc15626dd7d2d4a02b9c8d763687a0d34ce (patch) | |
tree | c0c7870ef24f831f557cc91b1c08dc05fe9cdc5f /test/activity_test.exs | |
parent | b962b24e6f984dbec0089c80b22fac8f4f9c1fa4 (diff) | |
download | pleroma-12635bc15626dd7d2d4a02b9c8d763687a0d34ce.tar.gz pleroma-12635bc15626dd7d2d4a02b9c8d763687a0d34ce.zip |
don't use global mocks in setup callbacks
Diffstat (limited to 'test/activity_test.exs')
-rw-r--r-- | test/activity_test.exs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/activity_test.exs b/test/activity_test.exs index 0c19f481b..7c3f66da9 100644 --- a/test/activity_test.exs +++ b/test/activity_test.exs @@ -11,6 +11,11 @@ defmodule Pleroma.ActivityTest do alias Pleroma.ThreadMute import Pleroma.Factory + setup_all do + Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end) + :ok + end + test "returns an activity by it's AP id" do activity = insert(:note_activity) found_activity = Activity.get_by_ap_id(activity.data["id"]) @@ -107,8 +112,6 @@ defmodule Pleroma.ActivityTest do describe "search" do setup do - Tesla.Mock.mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end) - user = insert(:user) params = %{ |