diff options
Diffstat (limited to 'spec/controllers/projects/pipelines_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/pipelines_controller_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb index 4cc5b3cba7c..74d7e056737 100644 --- a/spec/controllers/projects/pipelines_controller_spec.rb +++ b/spec/controllers/projects/pipelines_controller_spec.rb @@ -703,7 +703,7 @@ describe Projects::PipelinesController do it 'shows latest pipeline for the default project branch' do get :show, params: { namespace_id: project.namespace, project_id: project, latest: true, ref: nil } - expect(response).to have_gitlab_http_status(200) + expect(response).to have_gitlab_http_status(:ok) expect(assigns(:pipeline)).to have_attributes(id: pipeline_master.id) end end @@ -716,7 +716,7 @@ describe Projects::PipelinesController do it 'shows the latest pipeline for the provided ref' do get :show, params: { namespace_id: project.namespace, project_id: project, latest: true, ref: branch_secondary.name } - expect(response).to have_gitlab_http_status(200) + expect(response).to have_gitlab_http_status(:ok) expect(assigns(:pipeline)).to have_attributes(id: pipeline_secondary.id) end @@ -728,7 +728,7 @@ describe Projects::PipelinesController do it 'shows the provided ref with the last sha/pipeline combo' do get :show, params: { namespace_id: project.namespace, project_id: project, latest: true, ref: branch_secondary.name } - expect(response).to have_gitlab_http_status(200) + expect(response).to have_gitlab_http_status(:ok) expect(assigns(:pipeline)).to have_attributes(id: pipeline_secondary.id) end end @@ -737,7 +737,7 @@ describe Projects::PipelinesController do it 'renders a 404 if no pipeline is found for the ref' do get :show, params: { namespace_id: project.namespace, project_id: project, ref: 'no-branch' } - expect(response).to have_gitlab_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) end end @@ -754,7 +754,7 @@ describe Projects::PipelinesController do it 'deletes pipeline and redirects' do delete_pipeline - expect(response).to have_gitlab_http_status(303) + expect(response).to have_gitlab_http_status(:see_other) expect(Ci::Build.exists?(build.id)).to be_falsy expect(Ci::Pipeline.exists?(pipeline.id)).to be_falsy @@ -766,7 +766,7 @@ describe Projects::PipelinesController do it 'fails to delete pipeline' do delete_pipeline - expect(response).to have_gitlab_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) end end end @@ -775,7 +775,7 @@ describe Projects::PipelinesController do it 'fails to delete pipeline' do delete_pipeline - expect(response).to have_gitlab_http_status(403) + expect(response).to have_gitlab_http_status(:forbidden) end end |