Implement role authorization
This commit is contained in:
parent
6755328c4c
commit
e2fb434dc7
122 changed files with 1386 additions and 751 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_conference_1_role) { create(:organizer_conference_1_role) }
|
||||
|
||||
shared_examples 'add and update conference' do |user|
|
||||
scenario 'adds a new conference', feature: true, js: true do
|
||||
|
|
@ -36,7 +35,7 @@ feature Conference do
|
|||
scenario 'update conference', feature: true, js: true do
|
||||
conference = create(:conference)
|
||||
expected_count = Conference.count
|
||||
sign_in create(user)
|
||||
sign_in create(:organizer_conference_1)
|
||||
|
||||
visit edit_admin_conference_path(conference.short_title)
|
||||
click_link 'Edit'
|
||||
|
|
@ -65,9 +64,4 @@ feature Conference do
|
|||
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