demarches-normaliennes/spec/controllers/demo_controller_spec.rb

18 lines
414 B
Ruby
Raw Normal View History

2016-12-15 15:28:35 +01:00
require 'spec_helper'
describe DemoController, type: :controller do
describe 'GET #index' do
subject { get :index }
it { expect(subject.status).to eq 200 }
context 'when rails environnement is production' do
before do
allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new("production"))
end
it { expect(subject.status).to eq 302 }
end
end
2017-04-04 15:27:04 +02:00
end