summaryrefslogtreecommitdiff
path: root/spec/controllers/projects/merge_requests_controller_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-28 12:08:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-28 12:08:44 +0000
commitdb24ab2b72dbff24c201410a0561e929ae7e8061 (patch)
tree67297286aad8cc590ae325330a0bfe1e2a7e51dc /spec/controllers/projects/merge_requests_controller_spec.rb
parent7e8278c0f46cf6058efad5afd0aef177977bd663 (diff)
downloadgitlab-ce-db24ab2b72dbff24c201410a0561e929ae7e8061.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/projects/merge_requests_controller_spec.rb')
-rw-r--r--spec/controllers/projects/merge_requests_controller_spec.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb
index df2727d13cf..826c69ee5f0 100644
--- a/spec/controllers/projects/merge_requests_controller_spec.rb
+++ b/spec/controllers/projects/merge_requests_controller_spec.rb
@@ -113,7 +113,7 @@ describe Projects::MergeRequestsController do
}
expect(response).to redirect_to(project_merge_request_path(new_project, merge_request))
- expect(response).to have_gitlab_http_status(302)
+ expect(response).to have_gitlab_http_status(:found)
end
it 'redirects from an old merge request commits correctly' do
@@ -125,7 +125,7 @@ describe Projects::MergeRequestsController do
}
expect(response).to redirect_to(commits_project_merge_request_path(new_project, merge_request))
- expect(response).to have_gitlab_http_status(302)
+ expect(response).to have_gitlab_http_status(:found)
end
end
end
@@ -229,7 +229,7 @@ describe Projects::MergeRequestsController do
get_merge_requests(last_page)
expect(assigns(:merge_requests).current_page).to eq(last_page)
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
it 'does not redirect to external sites when provided a host field' do
@@ -306,7 +306,7 @@ describe Projects::MergeRequestsController do
it 'responds with 404' do
update_merge_request(title: 'New title')
- expect(response).to have_http_status(:not_found)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
@@ -381,7 +381,7 @@ describe Projects::MergeRequestsController do
end
it 'returns 404' do
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
@@ -615,7 +615,7 @@ describe Projects::MergeRequestsController do
it "denies access to users unless they're admin or project owner" do
delete :destroy, params: { namespace_id: project.namespace, project_id: project, id: merge_request.iid }
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
context "when the user is owner" do
@@ -630,7 +630,7 @@ describe Projects::MergeRequestsController do
it "deletes the merge request" do
delete :destroy, params: { namespace_id: project.namespace, project_id: project, id: merge_request.iid, destroy_confirm: true }
- expect(response).to have_gitlab_http_status(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(controller).to set_flash[:notice].to(/The merge request was successfully deleted\./)
end
@@ -639,7 +639,7 @@ describe Projects::MergeRequestsController do
delete :destroy, params: { namespace_id: project.namespace, project_id: project, id: merge_request.iid }
- expect(response).to have_gitlab_http_status(302)
+ expect(response).to have_gitlab_http_status(:found)
expect(controller).to set_flash[:notice].to('Destroy confirmation not provided for merge request')
end
@@ -648,7 +648,7 @@ describe Projects::MergeRequestsController do
delete :destroy, params: { namespace_id: project.namespace, project_id: project, id: merge_request.iid, format: 'json' }
- expect(response).to have_gitlab_http_status(422)
+ expect(response).to have_gitlab_http_status(:unprocessable_entity)
expect(json_response).to eq({ 'errors' => 'Destroy confirmation not provided for merge request' })
end
@@ -842,7 +842,7 @@ describe Projects::MergeRequestsController do
it 'responds with a 404' do
subject
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
expect(response.body).to be_blank
end
end
@@ -855,7 +855,7 @@ describe Projects::MergeRequestsController do
it 'responds with a 404' do
subject
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
expect(response.body).to be_blank
end
end
@@ -898,7 +898,7 @@ describe Projects::MergeRequestsController do
it 'returns exposed artifacts' do
subject
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(json_response['status']).to eq('parsed')
expect(json_response['data']).to eq([{
'job_name' => 'test',
@@ -951,7 +951,7 @@ describe Projects::MergeRequestsController do
it 'returns no content' do
subject
- expect(response).to have_gitlab_http_status(204)
+ expect(response).to have_gitlab_http_status(:no_content)
expect(response.body).to be_empty
end
end
@@ -998,7 +998,7 @@ describe Projects::MergeRequestsController do
it 'responds with a 404' do
subject
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
expect(response.body).to be_blank
end
end
@@ -1011,7 +1011,7 @@ describe Projects::MergeRequestsController do
it 'responds with a 404' do
subject
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
expect(response.body).to be_blank
end
end