update
This commit is contained in:
parent
28e55f3f50
commit
a5a2db4077
156 changed files with 3203 additions and 1206 deletions
|
|
@ -2,11 +2,11 @@ require 'spec_helper'
|
|||
|
||||
feature 'Has correct abilities' do
|
||||
# It is necessary to use bang version of let to build roles before user
|
||||
let(:conference1) { create(:conference) } # user is organizer
|
||||
let(:conference2) { create(:conference) } # user is cfp
|
||||
let(:conference3) { create(:conference) } # user is info_desk
|
||||
let(:conference4) { create(:conference) } # user is volunteer coordinator
|
||||
let(:conference5) { create(:conference) } # user has no role
|
||||
let(:conference1) { create(:full_conference) } # user is organizer
|
||||
let(:conference2) { create(:full_conference) } # user is cfp
|
||||
let(:conference3) { create(:full_conference) } # user is info_desk
|
||||
let(:conference4) { create(:full_conference) } # user is volunteer coordinator
|
||||
let(:conference5) { create(:full_conference) } # user has no role
|
||||
|
||||
let(:role_organizer) { create(:role, name: 'organizer', resource: conference1) }
|
||||
let(:role_cfp) { create(:role, name: 'cfp', resource: conference2) }
|
||||
|
|
@ -37,22 +37,23 @@ feature 'Has correct abilities' do
|
|||
expect(page).to have_link('Basics', href: "/admin/conference/#{conference1.short_title}/edit")
|
||||
expect(page).to have_link('Contact', href: "/admin/conference/#{conference1.short_title}/contact/edit")
|
||||
expect(page).to have_link('Commercials', href: "/admin/conference/#{conference1.short_title}/commercials")
|
||||
expect(page).to have_link('Events', href: "/admin/conference/#{conference1.short_title}/events")
|
||||
expect(page).to have_link('Events', href: "/admin/conference/#{conference1.short_title}/program/events")
|
||||
expect(page).to have_link('Registrations', href: "/admin/conference/#{conference1.short_title}/registrations")
|
||||
expect(page).to have_link('Schedule', href: "/admin/conference/#{conference1.short_title}/schedule")
|
||||
expect(page).to have_link('Campaigns', href: "/admin/conference/#{conference1.short_title}/campaigns")
|
||||
expect(page).to have_link('Goals', href: "/admin/conference/#{conference1.short_title}/targets")
|
||||
expect(page).to have_link('Venue', href: "/admin/conference/#{conference1.short_title}/venue")
|
||||
expect(page).to have_link('Rooms', href: "/admin/conference/#{conference1.short_title}/rooms")
|
||||
expect(page).to have_link('Rooms', href: "/admin/conference/#{conference1.short_title}/venue/rooms")
|
||||
expect(page).to have_link('Lodgings', href: "/admin/conference/#{conference1.short_title}/lodgings")
|
||||
expect(page).to have_link('Sponsorship', href: "/admin/conference/#{conference1.short_title}/sponsorship_levels")
|
||||
expect(page).to have_link('Sponsors', href: "/admin/conference/#{conference1.short_title}/sponsors")
|
||||
expect(page).to have_link('Tickets', href: "/admin/conference/#{conference1.short_title}/tickets")
|
||||
expect(page).to have_link('E-Mails', href: "/admin/conference/#{conference1.short_title}/emails")
|
||||
expect(page).to have_link('Call for Papers', href: "/admin/conference/#{conference1.short_title}/call_for_paper")
|
||||
expect(page).to have_link('Tracks', href: "/admin/conference/#{conference1.short_title}/tracks")
|
||||
expect(page).to have_link('Event Types', href: "/admin/conference/#{conference1.short_title}/event_types")
|
||||
expect(page).to have_link('Difficulty Levels', href: "/admin/conference/#{conference1.short_title}/difficulty_levels")
|
||||
expect(page).to have_link('Program', href: "/admin/conference/#{conference1.short_title}/program")
|
||||
expect(page).to have_link('Call for Papers', href: "/admin/conference/#{conference1.short_title}/program/cfp")
|
||||
expect(page).to have_link('Tracks', href: "/admin/conference/#{conference1.short_title}/program/tracks")
|
||||
expect(page).to have_link('Event Types', href: "/admin/conference/#{conference1.short_title}/program/event_types")
|
||||
expect(page).to have_link('Difficulty Levels', href: "/admin/conference/#{conference1.short_title}/program/difficulty_levels")
|
||||
expect(page).to have_link('Questions', href: "/admin/conference/#{conference1.short_title}/questions")
|
||||
expect(page).to have_link('Roles', href: "/admin/conference/#{conference1.short_title}/roles")
|
||||
|
||||
|
|
@ -65,8 +66,8 @@ feature 'Has correct abilities' do
|
|||
visit admin_conference_registrations_path(conference1.short_title)
|
||||
expect(current_path).to eq(admin_conference_registrations_path(conference1.short_title))
|
||||
|
||||
visit admin_conference_events_path(conference1.short_title)
|
||||
expect(current_path).to eq(admin_conference_events_path(conference1.short_title))
|
||||
visit admin_conference_program_events_path(conference1.short_title)
|
||||
expect(current_path).to eq(admin_conference_program_events_path(conference1.short_title))
|
||||
|
||||
visit admin_conference_schedule_path(conference1.short_title)
|
||||
expect(current_path).to eq(admin_conference_schedule_path(conference1.short_title))
|
||||
|
|
@ -93,8 +94,8 @@ feature 'Has correct abilities' do
|
|||
visit admin_conference_emails_path(conference1.short_title)
|
||||
expect(current_path).to eq(admin_conference_emails_path(conference1.short_title))
|
||||
|
||||
visit new_admin_conference_call_for_paper_path(conference1.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_call_for_paper_path(conference1.short_title))
|
||||
visit new_admin_conference_program_cfp_path(conference1.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_program_cfp_path(conference1.short_title))
|
||||
|
||||
visit admin_conference_questions_path(conference1.short_title)
|
||||
expect(current_path).to eq(admin_conference_questions_path(conference1.short_title))
|
||||
|
|
@ -113,22 +114,23 @@ feature 'Has correct abilities' do
|
|||
expect(page).to have_text('Basics')
|
||||
expect(page).to_not have_link('Contact', href: "/admin/conference/#{conference2.short_title}/contact/edit")
|
||||
expect(page).to have_link('Commercials', href: "/admin/conference/#{conference2.short_title}/commercials")
|
||||
expect(page).to have_link('Events', href: "/admin/conference/#{conference2.short_title}/events")
|
||||
expect(page).to have_link('Events', href: "/admin/conference/#{conference2.short_title}/program/events")
|
||||
expect(page).to_not have_link('Registrations', href: "/admin/conference/#{conference2.short_title}/registrations")
|
||||
expect(page).to have_link('Schedule', href: "/admin/conference/#{conference2.short_title}/schedule")
|
||||
expect(page).to_not have_link('Campaigns', href: "/admin/conference/#{conference2.short_title}/campaigns")
|
||||
expect(page).to_not have_link('Goals', href: "/admin/conference/#{conference2.short_title}/targets")
|
||||
expect(page).to have_link('Venue', href: "/admin/conference/#{conference2.short_title}/venue")
|
||||
expect(page).to have_link('Rooms', href: "/admin/conference/#{conference2.short_title}/rooms")
|
||||
expect(page).to have_link('Rooms', href: "/admin/conference/#{conference2.short_title}/venue/rooms")
|
||||
expect(page).to_not have_link('Lodgings', href: "/admin/conference/#{conference2.short_title}/lodgings")
|
||||
expect(page).to_not have_link('Sponsorship', href: "/admin/conference/#{conference2.short_title}/sponsorship_levels")
|
||||
expect(page).to_not have_link('Sponsors', href: "/admin/conference/#{conference2.short_title}/sponsors")
|
||||
expect(page).to_not have_link('Supporter Levels', href: "/admin/conference/#{conference2.short_title}/supporter_levels")
|
||||
expect(page).to have_link('E-Mails', href: "/admin/conference/#{conference2.short_title}/emails")
|
||||
expect(page).to have_link('Call for Papers', href: "/admin/conference/#{conference2.short_title}/call_for_paper")
|
||||
expect(page).to have_link('Tracks', href: "/admin/conference/#{conference2.short_title}/tracks")
|
||||
expect(page).to have_link('Event Types', href: "/admin/conference/#{conference2.short_title}/event_types")
|
||||
expect(page).to have_link('Difficulty Levels', href: "/admin/conference/#{conference2.short_title}/difficulty_levels")
|
||||
expect(page).to have_link('Program', href: "/admin/conference/#{conference2.short_title}/program")
|
||||
expect(page).to have_link('Call for Papers', href: "/admin/conference/#{conference2.short_title}/program/cfp")
|
||||
expect(page).to have_link('Tracks', href: "/admin/conference/#{conference2.short_title}/program/tracks")
|
||||
expect(page).to have_link('Event Types', href: "/admin/conference/#{conference2.short_title}/program/event_types")
|
||||
expect(page).to have_link('Difficulty Levels', href: "/admin/conference/#{conference2.short_title}/program/difficulty_levels")
|
||||
expect(page).to_not have_link('Questions', href: "/admin/conference/#{conference2.short_title}/questions")
|
||||
expect(page).to_not have_link('Roles', href: "/admin/conference/#{conference2.short_title}/roles")
|
||||
|
||||
|
|
@ -141,8 +143,8 @@ feature 'Has correct abilities' do
|
|||
visit admin_conference_registrations_path(conference2.short_title)
|
||||
expect(current_path).to eq(admin_conference_registrations_path(conference2.short_title))
|
||||
|
||||
visit admin_conference_events_path(conference2.short_title)
|
||||
expect(current_path).to eq(admin_conference_events_path(conference2.short_title))
|
||||
visit admin_conference_program_events_path(conference2.short_title)
|
||||
expect(current_path).to eq(admin_conference_program_events_path(conference2.short_title))
|
||||
|
||||
visit admin_conference_schedule_path(conference2.short_title)
|
||||
expect(current_path).to eq(admin_conference_schedule_path(conference2.short_title))
|
||||
|
|
@ -165,8 +167,8 @@ feature 'Has correct abilities' do
|
|||
visit admin_conference_emails_path(conference2.short_title)
|
||||
expect(current_path).to eq(admin_conference_emails_path(conference2.short_title))
|
||||
|
||||
visit new_admin_conference_call_for_paper_path(conference2.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_call_for_paper_path(conference2.short_title))
|
||||
visit new_admin_conference_program_cfp_path(conference2.short_title)
|
||||
expect(current_path).to eq(new_admin_conference_program_cfp_path(conference2.short_title))
|
||||
|
||||
visit admin_conference_questions_path(conference2.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
|
@ -185,22 +187,23 @@ feature 'Has correct abilities' do
|
|||
expect(page).to have_text('Basics')
|
||||
expect(page).to_not have_link('Contact', href: "/admin/conference/#{conference3.short_title}/contact/edit")
|
||||
expect(page).to have_link('Commercials', href: "/admin/conference/#{conference3.short_title}/commercials")
|
||||
expect(page).to_not have_link('Events', href: "/admin/conference/#{conference3.short_title}/events")
|
||||
expect(page).to_not have_link('Events', href: "/admin/conference/#{conference3.short_title}/program/events")
|
||||
expect(page).to have_link('Registrations', href: "/admin/conference/#{conference3.short_title}/registrations")
|
||||
expect(page).to_not have_link('Schedule', href: "/admin/conference/#{conference3.short_title}/schedule")
|
||||
expect(page).to_not have_link('Campaigns', href: "/admin/conference/#{conference3.short_title}/campaigns")
|
||||
expect(page).to_not have_link('Targets', href: "/admin/conference/#{conference3.short_title}/targets")
|
||||
expect(page).to_not have_link('Venue', href: "/admin/conference/#{conference3.short_title}/venue")
|
||||
expect(page).to_not have_link('Rooms', href: "/admin/conference/#{conference3.short_title}/rooms")
|
||||
expect(page).to_not have_link('Rooms', href: "/admin/conference/#{conference3.short_title}/venue/rooms")
|
||||
expect(page).to_not have_link('Lodgings', href: "/admin/conference/#{conference3.short_title}/lodgings")
|
||||
expect(page).to_not have_link('Sponsorship', href: "/admin/conference/#{conference3.short_title}/sponsorship_levels")
|
||||
expect(page).to_not have_link('Sponsors', href: "/admin/conference/#{conference3.short_title}/sponsors")
|
||||
expect(page).to_not have_link('Supporter Levels', href: "/admin/conference/#{conference3.short_title}/supporter_levels")
|
||||
expect(page).to_not have_link('E-Mails', href: "/admin/conference/#{conference3.short_title}/emails")
|
||||
expect(page).to_not have_link('Call for papers', href: "/admin/conference/#{conference3.short_title}/call_for_paper")
|
||||
expect(page).to_not have_link('Tracks', href: "/admin/conference/#{conference3.short_title}/tracks")
|
||||
expect(page).to_not have_link('Event types', href: "/admin/conference/#{conference3.short_title}/event_types")
|
||||
expect(page).to_not have_link('Difficulty levels', href: "/admin/conference/#{conference3.short_title}/difficulty_levels")
|
||||
expect(page).to_not have_link('Program', href: "/admin/conference/#{conference3.short_title}/program")
|
||||
expect(page).to_not have_link('Call for papers', href: "/admin/conference/#{conference3.short_title}/program/cfp")
|
||||
expect(page).to_not have_link('Tracks', href: "/admin/conference/#{conference3.short_title}/program/tracks")
|
||||
expect(page).to_not have_link('Event types', href: "/admin/conference/#{conference3.short_title}/program/event_types")
|
||||
expect(page).to_not have_link('Difficulty levels', href: "/admin/conference/#{conference3.short_title}/program/difficulty_levels")
|
||||
expect(page).to have_link('Questions', href: "/admin/conference/#{conference3.short_title}/questions")
|
||||
expect(page).to_not have_link('Roles', href: "/admin/conference/#{conference3.short_title}/roles")
|
||||
|
||||
|
|
@ -213,7 +216,7 @@ feature 'Has correct abilities' do
|
|||
visit admin_conference_registrations_path(conference3.short_title)
|
||||
expect(current_path).to eq(admin_conference_registrations_path(conference3.short_title))
|
||||
|
||||
visit admin_conference_events_path(conference3.short_title)
|
||||
visit admin_conference_program_events_path(conference3.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_conference_schedule_path(conference3.short_title)
|
||||
|
|
@ -237,7 +240,7 @@ feature 'Has correct abilities' do
|
|||
visit admin_conference_emails_path(conference3.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit new_admin_conference_call_for_paper_path(conference3.short_title)
|
||||
visit new_admin_conference_program_cfp_path(conference3.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_conference_questions_path(conference3.short_title)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue