Revert "Merge pull request #1865 from basecamp/public-avatar-caching"
This reverts commitc628f14c01, reversing changes made to4bafc73236.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user