Fix the mocks to use uppercase as well
This commit is contained in:
parent
243ed7d60f
commit
73b4d0d9a7
@ -158,7 +158,7 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
|
|||||||
media_proxy_url: media_proxy_url
|
media_proxy_url: media_proxy_url
|
||||||
} do
|
} do
|
||||||
Tesla.Mock.mock(fn
|
Tesla.Mock.mock(fn
|
||||||
%{method: "head", url: ^media_proxy_url} ->
|
%{method: "HEAD", url: ^media_proxy_url} ->
|
||||||
%Tesla.Env{status: 500, body: ""}
|
%Tesla.Env{status: 500, body: ""}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
|
|||||||
media_proxy_url: media_proxy_url
|
media_proxy_url: media_proxy_url
|
||||||
} do
|
} do
|
||||||
Tesla.Mock.mock(fn
|
Tesla.Mock.mock(fn
|
||||||
%{method: "head", url: ^media_proxy_url} ->
|
%{method: "HEAD", url: ^media_proxy_url} ->
|
||||||
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "application/pdf"}]}
|
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "application/pdf"}]}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
|
|||||||
clear_config([:media_preview_proxy, :min_content_length], 1_000_000_000)
|
clear_config([:media_preview_proxy, :min_content_length], 1_000_000_000)
|
||||||
|
|
||||||
Tesla.Mock.mock(fn
|
Tesla.Mock.mock(fn
|
||||||
%{method: "head", url: ^media_proxy_url} ->
|
%{method: "HEAD", url: ^media_proxy_url} ->
|
||||||
%Tesla.Env{
|
%Tesla.Env{
|
||||||
status: 200,
|
status: 200,
|
||||||
body: "",
|
body: "",
|
||||||
@ -218,7 +218,7 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
|
|||||||
media_proxy_url: media_proxy_url
|
media_proxy_url: media_proxy_url
|
||||||
} do
|
} do
|
||||||
Tesla.Mock.mock(fn
|
Tesla.Mock.mock(fn
|
||||||
%{method: "head", url: ^media_proxy_url} ->
|
%{method: "HEAD", url: ^media_proxy_url} ->
|
||||||
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/gif"}]}
|
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/gif"}]}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
|
|||||||
media_proxy_url: media_proxy_url
|
media_proxy_url: media_proxy_url
|
||||||
} do
|
} do
|
||||||
Tesla.Mock.mock(fn
|
Tesla.Mock.mock(fn
|
||||||
%{method: "head", url: ^media_proxy_url} ->
|
%{method: "HEAD", url: ^media_proxy_url} ->
|
||||||
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/jpeg"}]}
|
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/jpeg"}]}
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
|
|||||||
clear_config([:media_preview_proxy, :min_content_length], 100_000)
|
clear_config([:media_preview_proxy, :min_content_length], 100_000)
|
||||||
|
|
||||||
Tesla.Mock.mock(fn
|
Tesla.Mock.mock(fn
|
||||||
%{method: "head", url: ^media_proxy_url} ->
|
%{method: "HEAD", url: ^media_proxy_url} ->
|
||||||
%Tesla.Env{
|
%Tesla.Env{
|
||||||
status: 200,
|
status: 200,
|
||||||
body: "",
|
body: "",
|
||||||
@ -278,7 +278,7 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
|
|||||||
assert_dependencies_installed()
|
assert_dependencies_installed()
|
||||||
|
|
||||||
Tesla.Mock.mock(fn
|
Tesla.Mock.mock(fn
|
||||||
%{method: "head", url: ^media_proxy_url} ->
|
%{method: "HEAD", url: ^media_proxy_url} ->
|
||||||
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/png"}]}
|
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/png"}]}
|
||||||
|
|
||||||
%{method: :get, url: ^media_proxy_url} ->
|
%{method: :get, url: ^media_proxy_url} ->
|
||||||
@ -300,7 +300,7 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
|
|||||||
assert_dependencies_installed()
|
assert_dependencies_installed()
|
||||||
|
|
||||||
Tesla.Mock.mock(fn
|
Tesla.Mock.mock(fn
|
||||||
%{method: "head", url: ^media_proxy_url} ->
|
%{method: "HEAD", url: ^media_proxy_url} ->
|
||||||
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/jpeg"}]}
|
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/jpeg"}]}
|
||||||
|
|
||||||
%{method: :get, url: ^media_proxy_url} ->
|
%{method: :get, url: ^media_proxy_url} ->
|
||||||
@ -320,7 +320,7 @@ defmodule Pleroma.Web.MediaProxy.MediaProxyControllerTest do
|
|||||||
media_proxy_url: media_proxy_url
|
media_proxy_url: media_proxy_url
|
||||||
} do
|
} do
|
||||||
Tesla.Mock.mock(fn
|
Tesla.Mock.mock(fn
|
||||||
%{method: "head", url: ^media_proxy_url} ->
|
%{method: "HEAD", url: ^media_proxy_url} ->
|
||||||
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/jpeg"}]}
|
%Tesla.Env{status: 200, body: "", headers: [{"content-type", "image/jpeg"}]}
|
||||||
|
|
||||||
%{method: :get, url: ^media_proxy_url} ->
|
%{method: :get, url: ^media_proxy_url} ->
|
||||||
|
Loading…
Reference in New Issue
Block a user