Implement role authorization

This commit is contained in:
Stella Rouzi 2014-08-12 11:51:59 +03:00
parent 6755328c4c
commit e2fb434dc7
122 changed files with 1386 additions and 751 deletions

View file

@ -1,7 +1,8 @@
require 'spec_helper'
describe ConferenceController do
let(:conference) { create(:conference) }
let(:conference) { create(:conference, make_conference_public: true) }
describe 'GET #show' do
context 'conference made public' do
it 'assigns the requested conference to conference' do
@ -24,7 +25,7 @@ describe ConferenceController do
it 'renders flash saying conference not ready' do
get :show, id: conference.short_title
expect(flash[:notice]).to eq("Conference not ready yet!!")
expect(flash[:alert]).to eq('You are not authorized to access this page.')
end
end
context 'gallery photos for splash' do