Add PingController tests
This commit is contained in:
parent
502f41657b
commit
73261a34c0
1 changed files with 19 additions and 0 deletions
19
spec/controllers/ping_controller_spec.rb
Normal file
19
spec/controllers/ping_controller_spec.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe PingController, type: :controller do
|
||||
describe 'GET #index' do
|
||||
|
||||
subject { get :index }
|
||||
|
||||
it { expect(subject.status).to eq 200 }
|
||||
|
||||
context 'when base is un-plug' do
|
||||
|
||||
before do
|
||||
allow(ActiveRecord::Base).to receive(:connected?).and_return(false)
|
||||
end
|
||||
|
||||
it { expect(subject.status).to eq 500 }
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue