diff options
Diffstat (limited to 'spec/requests/api/ci/job_artifacts_spec.rb')
-rw-r--r-- | spec/requests/api/ci/job_artifacts_spec.rb | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/spec/requests/api/ci/job_artifacts_spec.rb b/spec/requests/api/ci/job_artifacts_spec.rb index 0db6acbc7b8..5abff85af9c 100644 --- a/spec/requests/api/ci/job_artifacts_spec.rb +++ b/spec/requests/api/ci/job_artifacts_spec.rb @@ -82,18 +82,6 @@ RSpec.describe API::Ci::JobArtifacts do end describe 'DELETE /projects/:id/artifacts' do - context 'when feature flag is disabled' do - before do - stub_feature_flags(bulk_expire_project_artifacts: false) - end - - it 'returns 404' do - delete api("/projects/#{project.id}/artifacts", api_user) - - expect(response).to have_gitlab_http_status(:not_found) - end - end - context 'when user is anonymous' do let(:api_user) { nil } @@ -236,6 +224,8 @@ RSpec.describe API::Ci::JobArtifacts do expect(response.headers.to_h) .to include('Content-Type' => 'application/json', 'Gitlab-Workhorse-Send-Data' => /artifacts-entry/) + expect(response.headers.to_h) + .not_to include('Gitlab-Workhorse-Detect-Content-Type' => 'true') expect(response.parsed_body).to be_empty end @@ -568,7 +558,8 @@ RSpec.describe API::Ci::JobArtifacts do expect(response).to have_gitlab_http_status(:ok) expect(response.headers.to_h) .to include('Content-Type' => 'application/json', - 'Gitlab-Workhorse-Send-Data' => /artifacts-entry/) + 'Gitlab-Workhorse-Send-Data' => /artifacts-entry/, + 'Gitlab-Workhorse-Detect-Content-Type' => 'true') end end @@ -638,7 +629,8 @@ RSpec.describe API::Ci::JobArtifacts do expect(response).to have_gitlab_http_status(:ok) expect(response.headers.to_h) .to include('Content-Type' => 'application/json', - 'Gitlab-Workhorse-Send-Data' => /artifacts-entry/) + 'Gitlab-Workhorse-Send-Data' => /artifacts-entry/, + 'Gitlab-Workhorse-Detect-Content-Type' => 'true') expect(response.parsed_body).to be_empty end end @@ -656,7 +648,8 @@ RSpec.describe API::Ci::JobArtifacts do expect(response).to have_gitlab_http_status(:ok) expect(response.headers.to_h) .to include('Content-Type' => 'application/json', - 'Gitlab-Workhorse-Send-Data' => /artifacts-entry/) + 'Gitlab-Workhorse-Send-Data' => /artifacts-entry/, + 'Gitlab-Workhorse-Detect-Content-Type' => 'true') end end |