mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
split feature tests for abilities and suggested changes
This commit is contained in:
parent
3daa12f83f
commit
651abcab87
8 changed files with 1059 additions and 721 deletions
21
spec/features/user_ability_spec.rb
Normal file
21
spec/features/user_ability_spec.rb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature 'Has correct abilities' do
|
||||
|
||||
let(:organization) { create(:organization) }
|
||||
let(:conference) { create(:full_conference, organization: organization) } # user is cfp
|
||||
let(:user) { create(:user) }
|
||||
|
||||
context 'when user has no role' do
|
||||
before do
|
||||
sign_in user
|
||||
end
|
||||
|
||||
scenario 'for administration views' do
|
||||
visit admin_conference_path(conference.short_title)
|
||||
|
||||
expect(current_path).to eq root_path
|
||||
expect(flash).to eq 'You are not authorized to access this page.'
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue