mirror of
https://github.com/funamitech/mastodon
synced 2024-11-23 22:57:05 +09:00
Convert health check endpoint controller spec to request spec (#31565)
This commit is contained in:
parent
e3516fa8cf
commit
641ae6a2cf
@ -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 New Issue
Block a user