Add PingController tests

This commit is contained in:
Xavier J 2016-12-15 15:31:05 +01:00
parent 502f41657b
commit 73261a34c0

View 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