mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-16 05:04:03 +00:00
Implement role authorization
This commit is contained in:
parent
6755328c4c
commit
e2fb434dc7
122 changed files with 1386 additions and 751 deletions
|
|
@ -2,9 +2,8 @@ require 'spec_helper'
|
|||
|
||||
feature DifficultyLevel 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 'difficulty levels' do |user|
|
||||
scenario 'adds and updates difficulty level', feature: true, js: true do
|
||||
|
|
@ -50,11 +49,7 @@ feature DifficultyLevel do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'admin' do
|
||||
it_behaves_like 'difficulty levels', :admin
|
||||
end
|
||||
|
||||
describe 'organizer' do
|
||||
it_behaves_like 'difficulty levels', :organizer
|
||||
it_behaves_like 'difficulty levels', :organizer_conference_1
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue