diff options
Diffstat (limited to 'spec/controllers/groups/clusters_controller_spec.rb')
-rw-r--r-- | spec/controllers/groups/clusters_controller_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/groups/clusters_controller_spec.rb b/spec/controllers/groups/clusters_controller_spec.rb index cdb45e1946e..28a174560dd 100644 --- a/spec/controllers/groups/clusters_controller_spec.rb +++ b/spec/controllers/groups/clusters_controller_spec.rb @@ -388,7 +388,7 @@ describe Groups::ClustersController do cluster = group.clusters.first - expect(response.status).to eq(201) + expect(response).to have_gitlab_http_status(:created) expect(response.location).to eq(group_cluster_path(group, cluster)) expect(cluster).to be_aws expect(cluster).to be_kubernetes @@ -404,7 +404,7 @@ describe Groups::ClustersController do it 'does not create a cluster' do expect { post_create_aws }.not_to change { Clusters::Cluster.count } - expect(response.status).to eq(422) + expect(response).to have_gitlab_http_status(:unprocessable_entity) expect(response.content_type).to eq('application/json') expect(response.body).to include('is invalid') end @@ -451,7 +451,7 @@ describe Groups::ClustersController do it 'creates an Aws::Role record' do expect { go }.to change { Aws::Role.count } - expect(response.status).to eq 200 + expect(response).to have_gitlab_http_status(:ok) role = Aws::Role.last expect(role.user).to eq user @@ -465,7 +465,7 @@ describe Groups::ClustersController do it 'does not create a record' do expect { go }.not_to change { Aws::Role.count } - expect(response.status).to eq 422 + expect(response).to have_gitlab_http_status(:unprocessable_entity) end end |