From 0b93f8cddedc3d2baea84b7694ecbd1aa3fcaa99 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Tue, 23 Oct 2018 16:19:43 +0200 Subject: Fix spec for Rails 5 --- spec/controllers/uploads_controller_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'spec/controllers/uploads_controller_spec.rb') diff --git a/spec/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb index f7af482b508..6420b70a54f 100644 --- a/spec/controllers/uploads_controller_spec.rb +++ b/spec/controllers/uploads_controller_spec.rb @@ -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 -- cgit v1.2.1