diff options
Diffstat (limited to 'spec/controllers/admin/clusters_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin/clusters_controller_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/admin/clusters_controller_spec.rb b/spec/controllers/admin/clusters_controller_spec.rb index 1f5c33d8022..bd6d5614ccd 100644 --- a/spec/controllers/admin/clusters_controller_spec.rb +++ b/spec/controllers/admin/clusters_controller_spec.rb @@ -261,7 +261,7 @@ describe Admin::ClustersController do cluster = Clusters::Cluster.instance_type.first - expect(response.status).to eq(201) + expect(response).to have_gitlab_http_status(:created) expect(response.location).to eq(admin_cluster_path(cluster)) expect(cluster).to be_aws expect(cluster).to be_kubernetes @@ -277,7 +277,7 @@ describe Admin::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 @@ -389,7 +389,7 @@ describe Admin::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 admin @@ -403,7 +403,7 @@ describe Admin::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 |