mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #1000 from nishanthvijayan/fix-ability-spec
Fix ability model spec
This commit is contained in:
commit
7135c0249d
1 changed files with 8 additions and 4 deletions
|
|
@ -171,7 +171,8 @@ describe 'User' do
|
|||
should be_able_to(:destroy, my_venue)
|
||||
end
|
||||
|
||||
it{ should be_able_to([:create, :new], Conference) }
|
||||
it{ should be_able_to(:new, Conference) }
|
||||
it{ should be_able_to(:create, Conference) }
|
||||
it{ should be_able_to(:manage, my_conference) }
|
||||
it{ should_not be_able_to(:manage, conference_public) }
|
||||
it{ should be_able_to(:manage, my_conference.splashpage) }
|
||||
|
|
@ -235,7 +236,8 @@ describe 'User' do
|
|||
let(:role) { Role.find_by(name: 'cfp', resource: my_conference) }
|
||||
let(:user) { create(:user, role_ids: [role.id]) }
|
||||
|
||||
it{ should_not be_able_to([:create, :new], Conference.new) }
|
||||
it{ should_not be_able_to(:new, Conference.new) }
|
||||
it{ should_not be_able_to(:create, Conference.new) }
|
||||
it{ should_not be_able_to(:manage, my_conference) }
|
||||
it{ should_not be_able_to(:manage, conference_public) }
|
||||
it{ should_not be_able_to(:manage, my_conference.splashpage) }
|
||||
|
|
@ -293,7 +295,8 @@ describe 'User' do
|
|||
let(:role) { Role.find_by(name: 'info_desk', resource: my_conference) }
|
||||
let(:user) { create(:user, role_ids: [role.id]) }
|
||||
|
||||
it{ should_not be_able_to([:create, :new], Conference.new) }
|
||||
it{ should_not be_able_to(:new, Conference.new) }
|
||||
it{ should_not be_able_to(:create, Conference.new) }
|
||||
it{ should_not be_able_to(:manage, my_conference) }
|
||||
it{ should_not be_able_to(:manage, conference_public) }
|
||||
it{ should_not be_able_to(:manage, my_conference.splashpage) }
|
||||
|
|
@ -351,7 +354,8 @@ describe 'User' do
|
|||
let(:role) { Role.find_by(name: 'volunteers_coordinator', resource: my_conference) }
|
||||
let(:user) { create(:user, role_ids: [role.id]) }
|
||||
|
||||
it{ should_not be_able_to([:create, :new], Conference.new) }
|
||||
it{ should_not be_able_to(:new, Conference.new) }
|
||||
it{ should_not be_able_to(:create, Conference.new) }
|
||||
it{ should_not be_able_to(:manage, my_conference) }
|
||||
it{ should_not be_able_to(:manage, conference_public) }
|
||||
it{ should_not be_able_to(:manage, my_conference.splashpage) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue