diff options
author | Robert Speicher <rspeicher@gmail.com> | 2019-02-26 18:22:10 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-02-26 18:22:10 +0000 |
commit | 9b3a0de5ed44fdcdb01bd520ad8e0ec8e3ab7ea6 (patch) | |
tree | 0baa0af87e391ed2c2d1b78daf7a08f15d0b06d4 /spec/controllers | |
parent | f5201a816f2eff9393e16f362403451e5d86ee6c (diff) | |
parent | e7e5efd1319c1eb11e52e33f12f4c25c07682dc0 (diff) | |
download | gitlab-ce-9b3a0de5ed44fdcdb01bd520ad8e0ec8e3ab7ea6.tar.gz |
Merge branch '57905-etag-caching-probably-broken-since-11-5-0' into 'master'
Fix ETag caching not being used for AJAX requests
Closes #57905
See merge request gitlab-org/gitlab-ce!25400
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/application_controller_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index c9e520317e8..dca74bd5f84 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -665,6 +665,14 @@ describe ApplicationController do expect(response.headers['Cache-Control']).to eq 'max-age=0, private, must-revalidate, no-store' end + + it 'does not set the "no-store" header for XHR requests' do + sign_in(user) + + get :index, xhr: true + + expect(response.headers['Cache-Control']).to eq 'max-age=0, private, must-revalidate' + end end end end |