Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-28 00:09:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-28 00:09:17 +0300
commitc77fda905a8619b756163c10a75171dc9cfe7084 (patch)
treeffa93b37bfe4b99ba0b8584c7a0bd1a4cd19772a /spec/requests/api/project_clusters_spec.rb
parente0fa0638a422c3e20d4423c9bb69d79afc9c7d3d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/project_clusters_spec.rb')
-rw-r--r--spec/requests/api/project_clusters_spec.rb40
1 files changed, 20 insertions, 20 deletions
diff --git a/spec/requests/api/project_clusters_spec.rb b/spec/requests/api/project_clusters_spec.rb
index f3d005322f2..7cef40ff3b5 100644
--- a/spec/requests/api/project_clusters_spec.rb
+++ b/spec/requests/api/project_clusters_spec.rb
@@ -26,7 +26,7 @@ describe API::ProjectClusters do
it 'responds with 403' do
get api("/projects/#{project.id}/clusters", developer_user)
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
end
end
@@ -36,7 +36,7 @@ describe API::ProjectClusters do
end
it 'responds with 200' do
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
it 'includes pagination headers' do
@@ -71,7 +71,7 @@ describe API::ProjectClusters do
it 'responds with 403' do
get api("/projects/#{project.id}/clusters/#{cluster_id}", developer_user)
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
end
end
@@ -142,7 +142,7 @@ describe API::ProjectClusters do
let(:cluster_id) { 123 }
it 'returns 404' do
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
end
@@ -175,7 +175,7 @@ describe API::ProjectClusters do
it 'responds with 403' do
post api("/projects/#{project.id}/clusters/user", developer_user), params: cluster_params
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
end
end
@@ -186,7 +186,7 @@ describe API::ProjectClusters do
context 'with valid params' do
it 'responds with 201' do
- expect(response).to have_gitlab_http_status(201)
+ expect(response).to have_gitlab_http_status(:created)
end
it 'creates a new Cluster::Cluster' do
@@ -236,7 +236,7 @@ describe API::ProjectClusters do
let(:namespace) { 'invalid_namespace' }
it 'responds with 400' do
- expect(response).to have_gitlab_http_status(400)
+ expect(response).to have_gitlab_http_status(:bad_request)
end
it 'does not create a new Clusters::Cluster' do
@@ -258,7 +258,7 @@ describe API::ProjectClusters do
end
it 'responds with 400' do
- expect(response).to have_gitlab_http_status(400)
+ expect(response).to have_gitlab_http_status(:bad_request)
expect(json_response['message']['base'].first).to eq(_('Instance does not support multiple Kubernetes clusters'))
end
@@ -270,7 +270,7 @@ describe API::ProjectClusters do
end
it 'responds with 403' do
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
expect(json_response['message']).to eq('403 Forbidden')
end
@@ -307,7 +307,7 @@ describe API::ProjectClusters do
it 'responds with 403' do
put api("/projects/#{project.id}/clusters/#{cluster.id}", developer_user), params: update_params
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
end
end
@@ -322,7 +322,7 @@ describe API::ProjectClusters do
context 'with valid params' do
it 'responds with 200' do
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
it 'updates cluster attributes' do
@@ -336,7 +336,7 @@ describe API::ProjectClusters do
let(:namespace) { 'invalid_namespace' }
it 'responds with 400' do
- expect(response).to have_gitlab_http_status(400)
+ expect(response).to have_gitlab_http_status(:bad_request)
end
it 'does not update cluster attributes' do
@@ -354,7 +354,7 @@ describe API::ProjectClusters do
let(:management_project_id) { create(:project).id }
it 'responds with 400' do
- expect(response).to have_gitlab_http_status(400)
+ expect(response).to have_gitlab_http_status(:bad_request)
end
it 'returns validation errors' do
@@ -372,7 +372,7 @@ describe API::ProjectClusters do
end
it 'responds with 400' do
- expect(response).to have_gitlab_http_status(400)
+ expect(response).to have_gitlab_http_status(:bad_request)
end
it 'returns validation error' do
@@ -384,7 +384,7 @@ describe API::ProjectClusters do
let(:namespace) { 'new-namespace' }
it 'responds with 200' do
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
end
end
@@ -413,7 +413,7 @@ describe API::ProjectClusters do
end
it 'responds with 200' do
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
it 'updates platform kubernetes attributes' do
@@ -430,7 +430,7 @@ describe API::ProjectClusters do
let(:cluster) { create(:cluster, :project, :provided_by_user) }
it 'responds with 404' do
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
end
@@ -448,7 +448,7 @@ describe API::ProjectClusters do
it 'responds with 403' do
delete api("/projects/#{project.id}/clusters/#{cluster.id}", developer_user), params: cluster_params
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
end
end
@@ -458,7 +458,7 @@ describe API::ProjectClusters do
end
it 'responds with 204' do
- expect(response).to have_gitlab_http_status(204)
+ expect(response).to have_gitlab_http_status(:no_content)
end
it 'deletes the cluster' do
@@ -469,7 +469,7 @@ describe API::ProjectClusters do
let(:cluster) { create(:cluster, :project, :provided_by_user) }
it 'responds with 404' do
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
end