Convert health check endpoint controller spec to request spec (#31565)

This commit is contained in:
Matt Jankowski 2024-08-26 08:17:35 -04:00 committed by GitHub
parent e3516fa8cf
commit 641ae6a2cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 14 deletions

View file

@ -1,14 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
describe HealthController do
render_views
describe 'GET #show' do
it 'returns http success' do
get :show
expect(response).to have_http_status(200)
end
end
end

View file

@ -0,0 +1,16 @@
# frozen_string_literal: true
require 'rails_helper'
describe 'Health check endpoint' do
describe 'GET /health' do
it 'returns http success when server is functioning' do
get '/health'
expect(response)
.to have_http_status(200)
expect(response.body)
.to include('OK')
end
end
end