parent
7793497862
commit
fedb0753bf
42 changed files with 578 additions and 236 deletions
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe ConferenceController do
|
||||
let(:conference) { create(:conference, make_conference_public: true) }
|
||||
let(:conference) { create(:conference, splashpage: create(:splashpage, public: true)) }
|
||||
|
||||
describe 'GET #show' do
|
||||
context 'conference made public' do
|
||||
|
|
@ -15,19 +15,7 @@ describe ConferenceController do
|
|||
expect(response).to render_template :show
|
||||
end
|
||||
end
|
||||
context 'conference is not public' do
|
||||
before(:each) { conference.update_attribute(:make_conference_public, false) }
|
||||
|
||||
it 'redirects to root path' do
|
||||
get :show, id: conference.short_title
|
||||
expect(response).to redirect_to root_path
|
||||
end
|
||||
|
||||
it 'renders flash saying conference not ready' do
|
||||
get :show, id: conference.short_title
|
||||
expect(flash[:alert]).to eq('You are not authorized to access this page.')
|
||||
end
|
||||
end
|
||||
context 'gallery photos for splash' do
|
||||
it 'return conference photos' do
|
||||
xhr :get, :gallery_photos, id: conference.short_title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue