demarches-normaliennes/spec/controllers/ping_controller_spec.rb
2017-06-13 10:35:23 +02:00

17 lines
374 B
Ruby

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