If there are only one conference in the future and it has a public splashpage, redirect to it in conferences#index.

Change tests root_path to conference_path(conference).

fix #1259
This commit is contained in:
David Sedeño 2017-12-06 23:45:52 +01:00
parent 0cb273749a
commit 73fdcaf4c9
7 changed files with 174 additions and 140 deletions

View file

@ -52,99 +52,99 @@ feature 'Has correct abilities' do
expect(current_path).to eq(admin_organizations_path)
visit edit_admin_organization_path(organization)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_organization_path
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit edit_admin_conference_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit edit_admin_conference_contact_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_commercials_path(conference.short_title)
expect(current_path).to eq(admin_conference_commercials_path(conference.short_title))
visit new_admin_conference_splashpage_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit edit_admin_conference_splashpage_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_venue_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
conference.venue = create(:venue)
visit edit_admin_conference_venue_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_lodgings_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_lodging_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
create(:lodging, conference: conference)
visit edit_admin_conference_lodging_path(conference.short_title, conference.lodgings.first)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_registration_period_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
create(:registration_period, conference: conference)
visit edit_admin_conference_registration_period_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_sponsorship_levels_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_sponsorship_level_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
create(:sponsorship_level, conference: conference)
visit edit_admin_conference_sponsorship_level_path(conference.short_title, conference.sponsorship_levels.first)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_sponsors_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_sponsor_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
create(:sponsor, conference: conference, sponsorship_level: conference.sponsorship_levels.first)
visit edit_admin_conference_sponsor_path(conference.short_title, conference.sponsors.first)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_tickets_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_ticket_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
create(:ticket, conference: conference)
visit edit_admin_conference_ticket_path(conference.short_title, conference.tickets.first)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_campaigns_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_campaign_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
create(:campaign, conference: conference)
visit edit_admin_conference_campaign_path(conference.short_title, conference.campaigns.first)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_targets_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_target_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
create(:target, conference: conference)
visit edit_admin_conference_target_path(conference.short_title, conference.targets.first)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_roles_path(conference.short_title)
expect(current_path).to eq(admin_conference_roles_path(conference.short_title))
@ -166,63 +166,63 @@ feature 'Has correct abilities' do
expect(current_path).to eq(admin_conference_path(conference.short_title))
visit admin_conference_venue_rooms_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
create(:room, venue: conference.venue)
visit edit_admin_conference_venue_room_path(conference.short_title, conference.venue.rooms.first)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_program_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit edit_admin_conference_program_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_program_cfp_path(conference.short_title)
expect(current_path).to eq root_path
expect(current_path).to eq conference_path(conference)
conference.program.cfp.destroy!
visit new_admin_conference_program_cfp_path(conference.short_title)
expect(current_path).to eq root_path
expect(current_path).to eq conference_path(conference)
create(:cfp, program: conference.program)
visit edit_admin_conference_program_cfp_path(conference.short_title, conference.program.cfp)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_program_events_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
create(:event, program: conference.program)
visit edit_admin_conference_program_event_path(conference.short_title, conference.program.events.first)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_program_event_types_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_program_event_type_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit edit_admin_conference_program_event_type_path(conference.short_title, conference.program.event_types.first)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_program_difficulty_levels_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit new_admin_conference_program_difficulty_level_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit edit_admin_conference_program_difficulty_level_path(conference.short_title, conference.program.difficulty_levels.first)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_schedules_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
create(:schedule, program: conference.program)
visit admin_conference_schedule_path(conference.short_title, conference.program.schedules.first)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_program_reports_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_registrations_path(conference.short_title)
expect(current_path).to eq(admin_conference_registrations_path(conference.short_title))
@ -235,16 +235,16 @@ feature 'Has correct abilities' do
expect(current_path).to eq(admin_conference_questions_path(conference.short_title))
visit admin_conference_program_tracks_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_users_path
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_user_path(user_info_desk)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
visit admin_conference_emails_path(conference.short_title)
expect(current_path).to eq(root_path)
expect(current_path).to eq(conference_path(conference))
end
end
end