Merge branch 'develop' into gun

This commit is contained in:
Alexander Strizhakov 2020-03-16 14:25:55 +03:00
commit f0651730bd
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
108 changed files with 1237 additions and 881 deletions

View file

@ -278,17 +278,6 @@ defmodule Pleroma.ReverseProxyTest do
end
describe "cache resp headers" do
test "returns headers", %{conn: conn} do
ClientMock
|> expect(:request, fn :get, "/cache/" <> ttl, _, _, _ ->
{:ok, 200, [{"cache-control", "public, max-age=" <> ttl}], %{}}
end)
|> expect(:stream_body, fn _ -> :done end)
conn = ReverseProxy.call(conn, "/cache/10")
assert {"cache-control", "public, max-age=10"} in conn.resp_headers
end
test "add cache-control", %{conn: conn} do
ClientMock
|> expect(:request, fn :get, "/cache", _, _, _ ->
@ -297,7 +286,7 @@ defmodule Pleroma.ReverseProxyTest do
|> expect(:stream_body, fn _ -> :done end)
conn = ReverseProxy.call(conn, "/cache")
assert {"cache-control", "public"} in conn.resp_headers
assert {"cache-control", "public, max-age=1209600"} in conn.resp_headers
end
end