Add representation proxy public Cache-Control test

This commit is contained in:
Mike Dalessio
2026-03-26 15:38:27 -04:00
parent e12f3e3917
commit 7446eed4e1
@@ -174,6 +174,14 @@ class ActiveStorageAuthorizationTest < ActionDispatch::IntegrationTest
assert_not_includes response.headers["Cache-Control"], "public"
end
test "representation proxy for publicly accessible blob sets public Cache-Control" do
blob = attach_avatar_to(users(:david))
get rails_storage_proxy_path(blob.representation(resize_to_fill: [ 256, 256 ]))
assert_response :success
assert_includes response.headers["Cache-Control"], "public"
end
# Account exports
test "export owner can download their export" do