mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #1303 from shlok007/ability-spec-resources
Include test for resources in features/ability_spec.rb
This commit is contained in:
commit
3bf8b2472d
1 changed files with 24 additions and 0 deletions
|
|
@ -56,6 +56,7 @@ feature 'Has correct abilities' do
|
|||
expect(page).to have_link('Difficulty Levels', href: "/admin/conferences/#{conference1.short_title}/program/difficulty_levels")
|
||||
expect(page).to have_link('Questions', href: "/admin/conferences/#{conference1.short_title}/questions")
|
||||
expect(page).to have_link('Roles', href: "/admin/conferences/#{conference1.short_title}/roles")
|
||||
expect(page).to have_link('Resources', href: "/admin/conferences/#{conference1.short_title}/resources")
|
||||
|
||||
visit edit_admin_conference_path(conference1.short_title)
|
||||
expect(current_path).to eq(edit_admin_conference_path(conference1.short_title))
|
||||
|
|
@ -103,6 +104,9 @@ feature 'Has correct abilities' do
|
|||
visit admin_conference_commercials_path(conference1.short_title)
|
||||
expect(current_path).to eq(admin_conference_commercials_path(conference1.short_title))
|
||||
|
||||
visit admin_conference_resources_path(conference1.short_title)
|
||||
expect(current_path).to eq(admin_conference_resources_path(conference1.short_title))
|
||||
|
||||
visit admin_revision_history_path
|
||||
expect(current_path).to eq(admin_revision_history_path)
|
||||
end
|
||||
|
|
@ -137,6 +141,7 @@ feature 'Has correct abilities' do
|
|||
expect(page).to have_link('Difficulty Levels', href: "/admin/conferences/#{conference2.short_title}/program/difficulty_levels")
|
||||
expect(page).to_not have_link('Questions', href: "/admin/conferences/#{conference2.short_title}/questions")
|
||||
expect(page).to have_link('Roles', href: "/admin/conferences/#{conference2.short_title}/roles")
|
||||
expect(page).to have_link('Resources', href: "/admin/conferences/#{conference2.short_title}/resources")
|
||||
|
||||
visit edit_admin_conference_path(conference2.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
|
@ -180,6 +185,9 @@ feature 'Has correct abilities' do
|
|||
visit admin_conference_commercials_path(conference2.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_conference_resources_path(conference2.short_title)
|
||||
expect(current_path).to eq(admin_conference_resources_path(conference2.short_title))
|
||||
|
||||
visit admin_revision_history_path
|
||||
expect(current_path).to eq(root_path)
|
||||
end
|
||||
|
|
@ -214,6 +222,7 @@ feature 'Has correct abilities' do
|
|||
expect(page).to_not have_link('Difficulty levels', href: "/admin/conferences/#{conference3.short_title}/program/difficulty_levels")
|
||||
expect(page).to have_link('Questions', href: "/admin/conferences/#{conference3.short_title}/questions")
|
||||
expect(page).to have_link('Roles', href: "/admin/conferences/#{conference3.short_title}/roles")
|
||||
expect(page).to have_link('Resources', href: "/admin/conferences/#{conference3.short_title}/resources")
|
||||
|
||||
visit edit_admin_conference_path(conference3.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
|
@ -257,7 +266,22 @@ feature 'Has correct abilities' do
|
|||
visit admin_conference_commercials_path(conference3.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_conference_resources_path(conference3.short_title)
|
||||
expect(current_path).to eq(admin_conference_resources_path(conference3.short_title))
|
||||
|
||||
visit admin_revision_history_path
|
||||
expect(current_path).to eq(root_path)
|
||||
end
|
||||
|
||||
scenario 'when user is volunteers_coordinator' do
|
||||
sign_in user_volunteers_coordinator
|
||||
|
||||
visit admin_conference_path(conference4.short_title)
|
||||
expect(current_path).to eq(admin_conference_path(conference4.short_title))
|
||||
|
||||
expect(page).to have_link('Resources', href: "/admin/conferences/#{conference4.short_title}/resources")
|
||||
|
||||
visit admin_conference_resources_path(conference4.short_title)
|
||||
expect(current_path).to eq(admin_conference_resources_path(conference4.short_title))
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue