diff options
author | Rémy Coutable <remy@rymai.me> | 2019-02-19 19:33:49 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-02-26 14:54:31 +0300 |
commit | d19331833844b8f0bab46b4a0e5f1ae43b0eab0c (patch) | |
tree | 955df0de75737cc152c892e523e731695a465a5c /spec | |
parent | b0097199a329c4de4eacc99a7d46d62c4ec0a1e0 (diff) |
Fix ETag caching not being used for AJAX requests
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec')
-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 |