mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-16 18:14:30 +08:00
Fix tests for health check endpoint [SCI-3522]
This commit is contained in:
parent
552f69b9b1
commit
2842ea381e
1 changed files with 4 additions and 12 deletions
|
@ -1,18 +1,6 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe Api::ApiController, type: :controller do
|
||||
describe 'GET #health' do
|
||||
before do
|
||||
get :health
|
||||
end
|
||||
|
||||
it 'Returns HTTP success and with correct text' do
|
||||
expect(response).to be_success
|
||||
expect(response).to have_http_status(200)
|
||||
expect(response.body).to match('RUNNING')
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET #status' do
|
||||
before do
|
||||
get :status
|
||||
|
@ -40,6 +28,10 @@ describe Api::ApiController, type: :controller do
|
|||
|
||||
describe 'GET #health' do
|
||||
before do
|
||||
stub_request(:get, Rails.application.secrets.system_notifications_uri + '/api/system_notifications')
|
||||
.with(query: hash_including('channels_slug': Rails.application.secrets.system_notifications_channel),
|
||||
headers: { 'Accept': 'application/vnd.system-notifications.1+json' })
|
||||
.to_return(status: 200, body: '', headers: {})
|
||||
get :health
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue