2014-05-19 21:21:06 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
|
|
describe ConferenceController do
|
2014-08-30 12:08:24 +02:00
|
|
|
let(:conference) { create(:conference, splashpage: create(:splashpage, public: true)) }
|
2014-08-12 11:51:59 +03:00
|
|
|
|
2014-05-19 21:25:42 +05:30
|
|
|
describe 'GET #show' do
|
2014-06-17 00:47:49 +05:30
|
|
|
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
|
2014-05-19 21:21:06 +05:30
|
|
|
|
2014-06-17 00:47:49 +05:30
|
|
|
it 'renders the show template' do
|
|
|
|
|
get :show, id: conference.short_title
|
|
|
|
|
expect(response).to render_template :show
|
|
|
|
|
end
|
|
|
|
|
end
|
2014-08-03 11:27:54 +05:30
|
|
|
|
|
|
|
|
context 'gallery photos for splash' do
|
|
|
|
|
it 'return conference photos' do
|
|
|
|
|
xhr :get, :gallery_photos, id: conference.short_title
|
|
|
|
|
expect(assigns(:photos)).to eq conference.photos
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'renders photos template' do
|
|
|
|
|
xhr :get, :gallery_photos, id: conference.short_title
|
|
|
|
|
expect(response).to render_template :photos
|
2014-06-17 00:47:49 +05:30
|
|
|
end
|
2014-05-28 15:06:08 +05:30
|
|
|
end
|
|
|
|
|
end
|
2014-05-19 21:21:06 +05:30
|
|
|
end
|