diff options
author | rinpatch <rinpatch@sdf.org> | 2020-03-14 11:19:42 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2020-03-14 11:19:42 +0000 |
commit | d88c8a9614808c00e25025fa70d9e1192bbbf89b (patch) | |
tree | 6d33529b292c947c8db74a7564d1e4a34be4d1d1 /test | |
parent | 38f796a5c6f526c84c8e0cc2e838c453dd70802b (diff) | |
parent | 6a28c198af415c81596587f765e6c8c9388e9714 (diff) | |
download | pleroma-d88c8a9614808c00e25025fa70d9e1192bbbf89b.tar.gz |
Merge branch 'fix/cache-control-headers' into 'develop'
Fix Cache Control headers on media
See merge request pleroma/pleroma!2295
Diffstat (limited to 'test')
-rw-r--r-- | test/reverse_proxy_test.exs | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/test/reverse_proxy_test.exs b/test/reverse_proxy_test.exs index 18d70862c..87c6aca4e 100644 --- a/test/reverse_proxy_test.exs +++ b/test/reverse_proxy_test.exs @@ -275,17 +275,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", _, _, _ -> @@ -294,7 +283,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 |