diff options
author | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-09-20 07:01:52 +0300 |
---|---|---|
committer | Vitaliy @blackst0ne Klachkov <blackst0ne.ru@gmail.com> | 2017-09-20 07:01:52 +0300 |
commit | 3c56b118020681e3220cf0aff568b18589e80b4c (patch) | |
tree | 42f1847d0a9c073da9eec4210e037d02cbe264f7 /spec/requests | |
parent | 59e827db3bd497844e82911cb6c6d899453029f9 (diff) |
[rails5] Fix spec/requests/api/jobs_spec.rb
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/jobs_spec.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/requests/api/jobs_spec.rb b/spec/requests/api/jobs_spec.rb index 66948c5ad4d..4229fcda785 100644 --- a/spec/requests/api/jobs_spec.rb +++ b/spec/requests/api/jobs_spec.rb @@ -26,7 +26,7 @@ describe API::Jobs do let(:query) { Hash.new } before do - get api("/projects/#{project.id}/jobs", api_user), query + get api("/projects/#{project.id}/jobs", api_user), params: query end context 'authorized user' do @@ -89,7 +89,7 @@ describe API::Jobs do let(:query) { Hash.new } before do - get api("/projects/#{project.id}/pipelines/#{pipeline.id}/jobs", api_user), query + get api("/projects/#{project.id}/pipelines/#{pipeline.id}/jobs", api_user), params: query end context 'authorized user' do @@ -245,9 +245,8 @@ describe API::Jobs do get_artifact_file(artifact) expect(response).to have_http_status(200) - expect(response.headers) - .to include('Content-Type' => 'application/json', - 'Gitlab-Workhorse-Send-Data' => /artifacts-entry/) + expect(response.headers['Content-Type']).to eq('application/json') + expect(response.headers['Gitlab-Workhorse-Send-Data']).to match(/artifacts-entry/) end end end @@ -311,7 +310,7 @@ describe API::Jobs do end def get_for_ref(ref = pipeline.ref, job_name = job.name) - get api("/projects/#{project.id}/jobs/artifacts/#{ref}/download", api_user), job: job_name + get api("/projects/#{project.id}/jobs/artifacts/#{ref}/download", api_user), params: { job: job_name } end context 'when not logged in' do |