Revert "Merge pull request #1865 from basecamp/public-avatar-caching"

This reverts commit c628f14c01, reversing
changes made to 4bafc73236.
This commit is contained in:
Kevin McConnell
2025-12-15 13:07:13 +00:00
parent 2058743be9
commit 741eff7bdc
10 changed files with 41 additions and 91 deletions
@@ -12,10 +12,17 @@ class Users::AvatarsControllerTest < ActionDispatch::IntegrationTest
assert_redirected_to ActionController::Base.helpers.image_path("system_user.png")
end
test "show initials with public caching" do
test "show own initials without caching" do
get user_avatar_path(users(:david))
assert_match "image/svg+xml", @response.content_type
assert @response.cache_control[:public]
assert @response.cache_control[:private]
assert_equal "0", @response.cache_control[:max_age]
end
test "show other initials with caching" do
get user_avatar_path(users(:kevin))
assert_match "image/svg+xml", @response.content_type
assert @response.cache_control[:private]
assert_equal 30.minutes.to_s, @response.cache_control[:max_age]
end