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

View file

@ -8,9 +8,13 @@ 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`.
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
describe UploadsController do
let!(:user) { create(:user, avatar: fixture_file_upload("spec/fixtures/dk.png", "image/png")) }