Roles into their own controller. Rework interface. Add flash messages to ajax calls. Add description to roles. Possible to edit roles in use.
This commit is contained in:
parent
eda5c2bc07
commit
ccd7ecbb90
59 changed files with 618 additions and 356 deletions
14
spec/models/role_spec.rb
Normal file
14
spec/models/role_spec.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Role do
|
||||
let(:conference) { create(:conference) }
|
||||
let!(:organizer_role) { Role.find_by(name: 'organizer', resource: conference) }
|
||||
let!(:cfp_role) { Role.find_by(name: 'cfp', resource: conference) }
|
||||
let!(:organizer) { create(:user, role_ids: organizer_role.id) }
|
||||
|
||||
it 'get_users' do
|
||||
expect(organizer_role.users).to include organizer
|
||||
expect(organizer_role.users.count).to eq 1
|
||||
expect(cfp_role.users).to eq []
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue