mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Remove assumption from test that first user is admin
This commit is contained in:
parent
0619eb7963
commit
d2b392e119
8 changed files with 6 additions and 21 deletions
|
|
@ -23,7 +23,6 @@ feature 'BaseController' do
|
|||
end
|
||||
|
||||
it 'not an admin it redirects to root_path' do
|
||||
user.is_admin = false
|
||||
visit admin_conference_index_path
|
||||
expect(current_path).to eq root_path
|
||||
expect(flash).to eq 'You are not authorized to access this area!'
|
||||
|
|
@ -36,28 +35,24 @@ feature 'BaseController' do
|
|||
end
|
||||
|
||||
it 'an organizer he can access the admin area' do
|
||||
user.is_admin = false
|
||||
user.role_ids = organizer_role.id
|
||||
visit admin_conference_index_path
|
||||
expect(current_path).to eq admin_conference_index_path
|
||||
end
|
||||
|
||||
it 'a volunteers_coordinator he can access the admin area' do
|
||||
user.is_admin = false
|
||||
user.role_ids = volunteers_coordinator_role.id
|
||||
visit admin_conference_index_path
|
||||
expect(current_path).to eq admin_conference_index_path
|
||||
end
|
||||
|
||||
it 'a cfp he can access the admin area' do
|
||||
user.is_admin = false
|
||||
user.role_ids = cfp_role.id
|
||||
visit admin_conference_index_path
|
||||
expect(current_path).to eq admin_conference_index_path
|
||||
end
|
||||
|
||||
it 'an info_desk he can access the admin area' do
|
||||
user.is_admin = false
|
||||
user.role_ids = info_desk_role.id
|
||||
visit admin_conference_index_path
|
||||
expect(current_path).to eq admin_conference_index_path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue