Fix spec for Rails 5

This commit is contained in:
James Lopez 2018-10-23 16:19:43 +02:00
parent 782badd0a2
commit 0b93f8cdde
No known key found for this signature in database
GPG Key ID: 756BF8E9D7C0CF39
1 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,11 @@ end
shared_examples 'content not cached without revalidation and no-store' do
it 'ensures content will not be cached without revalidation' do
# Fixed in newer versions of ActivePack, it will only output a single `private`.
expect(subject['Cache-Control']).to eq('max-age=0, private, must-revalidate, private, no-store')
if Gitlab.rails5?
expect(subject['Cache-Control']).to eq('max-age=0, private, must-revalidate, no-store')
else
expect(subject['Cache-Control']).to eq('max-age=0, private, must-revalidate, private, no-store')
end
end
end