diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-01 00:08:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-01 00:08:05 +0300 |
commit | abae8f34f377519946a91101ef7abf504454531c (patch) | |
tree | 359fab0082860b6850d4a0a492b8f12eb3d4eb0b /spec/controllers/admin | |
parent | 580622bdb3c762a8e89facd8a3946881ee480442 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/admin')
-rw-r--r-- | spec/controllers/admin/application_settings_controller_spec.rb | 6 | ||||
-rw-r--r-- | spec/controllers/admin/clusters_controller_spec.rb | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index ea51f3fcdf4..33764818f79 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -23,7 +23,7 @@ describe Admin::ApplicationSettingsController do it 'returns 404' do get :usage_data, format: :html - expect(response.status).to eq(404) + expect(response).to have_gitlab_http_status(:not_found) end end @@ -37,7 +37,7 @@ describe Admin::ApplicationSettingsController do get :usage_data, format: :html expect(response.body).to start_with('<span') - expect(response.status).to eq(200) + expect(response).to have_gitlab_http_status(:ok) end it 'returns JSON data' do @@ -46,7 +46,7 @@ describe Admin::ApplicationSettingsController do body = json_response expect(body["version"]).to eq(Gitlab::VERSION) expect(body).to include('counts') - expect(response.status).to eq(200) + expect(response).to have_gitlab_http_status(:ok) end end 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 |