ensure we mock_global
This commit is contained in:
parent
3e1f5e5372
commit
842cac2a50
2 changed files with 1 additions and 10 deletions
|
@ -9,7 +9,7 @@ defmodule Pleroma.Web.WebFingerTest do
|
||||||
import Tesla.Mock
|
import Tesla.Mock
|
||||||
|
|
||||||
setup do
|
setup do
|
||||||
mock(fn env -> apply(HttpRequestMock, :request, [env]) end)
|
mock_global(fn env -> apply(HttpRequestMock, :request, [env]) end)
|
||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1464,15 +1464,6 @@ defmodule HttpRequestMock do
|
||||||
}}
|
}}
|
||||||
end
|
end
|
||||||
|
|
||||||
def get("https://misskey.io/notes/8vs6wxufd0", _, _, _) do
|
|
||||||
{:ok,
|
|
||||||
%Tesla.Env{
|
|
||||||
status: 200,
|
|
||||||
body: File.read!("test/fixtures/tesla_mock/misskey.io_8vs6wxufd0.json"),
|
|
||||||
headers: activitypub_object_headers()
|
|
||||||
}}
|
|
||||||
end
|
|
||||||
|
|
||||||
def get("https://google.com/", _, _, _) do
|
def get("https://google.com/", _, _, _) do
|
||||||
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/google.html")}}
|
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/rich_media/google.html")}}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue