diff options
Diffstat (limited to 'spec/controllers/projects/repositories_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/repositories_controller_spec.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/spec/controllers/projects/repositories_controller_spec.rb b/spec/controllers/projects/repositories_controller_spec.rb index 928428b5caf..8186176a46b 100644 --- a/spec/controllers/projects/repositories_controller_spec.rb +++ b/spec/controllers/projects/repositories_controller_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -RSpec.describe Projects::RepositoriesController do +RSpec.describe Projects::RepositoriesController, feature_category: :source_code_management do let_it_be(:project) { create(:project, :repository) } describe 'POST create' do @@ -143,7 +143,9 @@ RSpec.describe Projects::RepositoriesController do expect(response).to have_gitlab_http_status(:ok) expect(response.header['ETag']).to be_present - expect(response.header['Cache-Control']).to include('max-age=60, public') + expect(response.header['Cache-Control']).to eq( + 'max-age=60, public, must-revalidate, stale-while-revalidate=60, stale-if-error=300, s-maxage=60' + ) end context 'and repo is private' do @@ -154,7 +156,9 @@ RSpec.describe Projects::RepositoriesController do expect(response).to have_gitlab_http_status(:ok) expect(response.header['ETag']).to be_present - expect(response.header['Cache-Control']).to include('max-age=60, private') + expect(response.header['Cache-Control']).to eq( + 'max-age=60, private, must-revalidate, stale-while-revalidate=60, stale-if-error=300, s-maxage=60' + ) end end end @@ -164,7 +168,9 @@ RSpec.describe Projects::RepositoriesController do get_archive('ddd0f15ae83993f5cb66a927a28673882e99100b') expect(response).to have_gitlab_http_status(:ok) - expect(response.header['Cache-Control']).to include('max-age=3600') + expect(response.header['Cache-Control']).to eq( + 'max-age=3600, private, must-revalidate, stale-while-revalidate=60, stale-if-error=300, s-maxage=60' + ) end end |