rework roles with rolify
This commit is contained in:
parent
f9f840c811
commit
4af0e59ca6
40 changed files with 167 additions and 228 deletions
|
|
@ -3,9 +3,8 @@ require 'spec_helper'
|
|||
feature Conference do
|
||||
|
||||
# It is necessary to use bang version of let to build roles before user
|
||||
let!(:organizer_role) { create(:organizer_role) }
|
||||
let!(:participant_role) { create(:participant_role) }
|
||||
let!(:admin_role) { create(:admin_role) }
|
||||
let!(:organizer_role) { create(:organizer_role) }
|
||||
|
||||
shared_examples 'add and update conference' do |user|
|
||||
scenario 'adds a new conference', feature: true, js: true do
|
||||
|
|
@ -56,12 +55,7 @@ feature Conference do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'admin' do
|
||||
it_behaves_like 'add and update conference', :admin
|
||||
end
|
||||
|
||||
describe 'organizer' do
|
||||
it_behaves_like 'add and update conference', :organizer
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue