mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 12:58:06 +01:00
Convert health check endpoint controller spec to request spec (#31565)
This commit is contained in:
parent
e3516fa8cf
commit
641ae6a2cf
2 changed files with 16 additions and 14 deletions
|
@ -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
|
16
spec/requests/health_spec.rb
Normal file
16
spec/requests/health_spec.rb
Normal 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
|
Loading…
Reference in a new issue