osem-fcy/spec/controllers/conference_controller_spec.rb

35 lines
850 B
Ruby
Raw Normal View History

require 'spec_helper'
describe ConferenceController do
let(:conference) { create(:conference, splashpage: create(:splashpage, public: true)) }
2014-08-12 11:51:59 +03:00
2014-11-14 17:24:24 +01:00
describe 'GET #index' do
it 'Response code is 200' do
get :index
expect(response.response_code).to eq(200)
end
end
2014-05-19 21:25:42 +05:30
describe 'GET #show' do
context 'conference made public' do
it 'assigns the requested conference to conference' do
get :show, id: conference.short_title
expect(assigns(:conference)).to eq conference
end
it 'renders the show template' do
get :show, id: conference.short_title
expect(response).to render_template :show
end
end
2014-05-28 15:06:08 +05:30
end
2014-11-14 17:24:24 +01:00
describe 'OPTIONS #index' do
it 'Response code is 200' do
process :index, 'OPTIONS'
expect(response.response_code).to eq(200)
end
end
end