summaryrefslogtreecommitdiff
path: root/spec/controllers/health_check_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/health_check_controller_spec.rb')
-rw-r--r--spec/controllers/health_check_controller_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/controllers/health_check_controller_spec.rb b/spec/controllers/health_check_controller_spec.rb
index 32b72eec0d6..7f55c4407dd 100644
--- a/spec/controllers/health_check_controller_spec.rb
+++ b/spec/controllers/health_check_controller_spec.rb
@@ -34,14 +34,14 @@ RSpec.describe HealthCheckController, :request_store do
get :index
expect(response).to be_successful
- expect(response.content_type).to eq 'text/plain'
+ expect(response.media_type).to eq 'text/plain'
end
it 'supports passing the token in query params' do
get :index, params: { token: token }
expect(response).to be_successful
- expect(response.content_type).to eq 'text/plain'
+ expect(response.media_type).to eq 'text/plain'
end
end
end
@@ -55,14 +55,14 @@ RSpec.describe HealthCheckController, :request_store do
get :index
expect(response).to be_successful
- expect(response.content_type).to eq 'text/plain'
+ expect(response.media_type).to eq 'text/plain'
end
it 'supports successful json response' do
get :index, format: :json
expect(response).to be_successful
- expect(response.content_type).to eq 'application/json'
+ expect(response.media_type).to eq 'application/json'
expect(json_response['healthy']).to be true
end
@@ -70,7 +70,7 @@ RSpec.describe HealthCheckController, :request_store do
get :index, format: :xml
expect(response).to be_successful
- expect(response.content_type).to eq 'application/xml'
+ expect(response.media_type).to eq 'application/xml'
expect(xml_response['healthy']).to be true
end
@@ -78,7 +78,7 @@ RSpec.describe HealthCheckController, :request_store do
get :index, params: { checks: 'email' }, format: :json
expect(response).to be_successful
- expect(response.content_type).to eq 'application/json'
+ expect(response.media_type).to eq 'application/json'
expect(json_response['healthy']).to be true
end
end
@@ -102,7 +102,7 @@ RSpec.describe HealthCheckController, :request_store do
get :index
expect(response).to have_gitlab_http_status(:internal_server_error)
- expect(response.content_type).to eq 'text/plain'
+ expect(response.media_type).to eq 'text/plain'
expect(response.body).to include('The server is on fire')
end
@@ -110,7 +110,7 @@ RSpec.describe HealthCheckController, :request_store do
get :index, format: :json
expect(response).to have_gitlab_http_status(:internal_server_error)
- expect(response.content_type).to eq 'application/json'
+ expect(response.media_type).to eq 'application/json'
expect(json_response['healthy']).to be false
expect(json_response['message']).to include('The server is on fire')
end
@@ -119,7 +119,7 @@ RSpec.describe HealthCheckController, :request_store do
get :index, format: :xml
expect(response).to have_gitlab_http_status(:internal_server_error)
- expect(response.content_type).to eq 'application/xml'
+ expect(response.media_type).to eq 'application/xml'
expect(xml_response['healthy']).to be false
expect(xml_response['message']).to include('The server is on fire')
end
@@ -128,7 +128,7 @@ RSpec.describe HealthCheckController, :request_store do
get :index, params: { checks: 'email' }, format: :json
expect(response).to have_gitlab_http_status(:internal_server_error)
- expect(response.content_type).to eq 'application/json'
+ expect(response.media_type).to eq 'application/json'
expect(json_response['healthy']).to be false
expect(json_response['message']).to include('Email is on fire')
end