Commit 7ebbe11e authored by Alex Gleason's avatar Alex Gleason Committed by lain
Browse files

user_agent_mock --> request_mock

parent 1dc5794e
......@@ -18,7 +18,7 @@ defmodule Pleroma.ReverseProxyTest do
setup :verify_on_exit!
defp user_agent_mock(invokes) do
defp request_mock(invokes) do
ClientMock
|> expect(:request, fn :get, url, headers, _body, _opts ->
Registry.register(ClientMock, url, 0)
......@@ -45,7 +45,7 @@ defp user_agent_mock(invokes) do
describe "reverse proxy" do
test "do not track successful request", %{conn: conn} do
user_agent_mock(2)
request_mock(2)
url = "/success"
conn = ReverseProxy.call(conn, url)
......@@ -56,7 +56,7 @@ test "do not track successful request", %{conn: conn} do
end
test "use Pleroma's user agent in the request; don't pass the client's", %{conn: conn} do
user_agent_mock(2)
request_mock(2)
conn =
conn
......@@ -110,7 +110,7 @@ defp stream_mock(invokes, with_close? \\ false) do
describe "max_body" do
test "length returns error if content-length more than option", %{conn: conn} do
user_agent_mock(0)
request_mock(0)
assert capture_log(fn ->
ReverseProxy.call(conn, "/huge-file", max_body_length: 4)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment