Fix rspec tests because of the changes to the cfp
Remove redundant association Note: a conference created with :full_conference already has a cfp
This commit is contained in:
parent
2bff918556
commit
a1124546f1
16 changed files with 78 additions and 74 deletions
|
|
@ -40,7 +40,7 @@ feature 'Has correct abilities' do
|
|||
expect(page).to have_link('Rooms', href: "/admin/conferences/#{conference1.short_title}/venue/rooms")
|
||||
expect(page).to have_link('Lodgings', href: "/admin/conferences/#{conference1.short_title}/lodgings")
|
||||
expect(page).to have_link('Program', href: "/admin/conferences/#{conference1.short_title}/program")
|
||||
expect(page).to have_link('Call for Papers', href: "/admin/conferences/#{conference1.short_title}/program/cfp")
|
||||
expect(page).to have_link('Call for Papers', href: "/admin/conferences/#{conference1.short_title}/program/cfps")
|
||||
expect(page).to have_link('Events', href: "/admin/conferences/#{conference1.short_title}/program/events")
|
||||
expect(page).to have_link('Tracks', href: "/admin/conferences/#{conference1.short_title}/program/tracks")
|
||||
expect(page).to have_link('Event Types', href: "/admin/conferences/#{conference1.short_title}/program/event_types")
|
||||
|
|
@ -112,8 +112,8 @@ feature 'Has correct abilities' do
|
|||
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 edit_admin_conference_program_cfp_path(conference1.short_title)
|
||||
expect(current_path).to eq(edit_admin_conference_program_cfp_path(conference1.short_title))
|
||||
visit edit_admin_conference_program_cfp_path(conference1.short_title, conference1.program.cfp)
|
||||
expect(current_path).to eq(edit_admin_conference_program_cfp_path(conference1.short_title, conference1.program.cfp))
|
||||
|
||||
visit admin_conference_program_events_path(conference1.short_title)
|
||||
expect(current_path).to eq(admin_conference_program_events_path(conference1.short_title))
|
||||
|
|
@ -256,7 +256,7 @@ feature 'Has correct abilities' do
|
|||
expect(page).to have_link('Rooms', href: "/admin/conferences/#{conference2.short_title}/venue/rooms")
|
||||
expect(page).to_not have_link('Lodgings', href: "/admin/conferences/#{conference2.short_title}/lodgings")
|
||||
expect(page).to have_link('Program', href: "/admin/conferences/#{conference2.short_title}/program")
|
||||
expect(page).to have_link('Call for Papers', href: "/admin/conferences/#{conference2.short_title}/program/cfp")
|
||||
expect(page).to have_link('Call for Papers', href: "/admin/conferences/#{conference2.short_title}/program/cfps")
|
||||
expect(page).to have_link('Events', href: "/admin/conferences/#{conference2.short_title}/program/events")
|
||||
expect(page).to have_link('Tracks', href: "/admin/conferences/#{conference2.short_title}/program/tracks")
|
||||
expect(page).to have_link('Event Types', href: "/admin/conferences/#{conference2.short_title}/program/event_types")
|
||||
|
|
@ -324,8 +324,8 @@ feature 'Has correct abilities' do
|
|||
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 edit_admin_conference_program_cfp_path(conference2.short_title)
|
||||
expect(current_path).to eq(edit_admin_conference_program_cfp_path(conference2.short_title))
|
||||
visit edit_admin_conference_program_cfp_path(conference2.short_title, conference2.program.cfp)
|
||||
expect(current_path).to eq(edit_admin_conference_program_cfp_path(conference2.short_title, conference2.program.cfp))
|
||||
|
||||
visit admin_conference_program_events_path(conference2.short_title)
|
||||
expect(current_path).to eq(admin_conference_program_events_path(conference2.short_title))
|
||||
|
|
@ -537,7 +537,7 @@ feature 'Has correct abilities' do
|
|||
visit new_admin_conference_program_cfp_path(conference3.short_title)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit edit_admin_conference_program_cfp_path(conference3.short_title)
|
||||
visit edit_admin_conference_program_cfp_path(conference3.short_title, conference3.program.cfp)
|
||||
expect(current_path).to eq(root_path)
|
||||
|
||||
visit admin_conference_program_events_path(conference3.short_title)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ feature Conference do
|
|||
# Validations
|
||||
expect(flash)
|
||||
.to eq('Call for papers successfully created.')
|
||||
|
||||
visit admin_conference_program_cfp_path(conference.short_title, conference.program.cfp)
|
||||
expect(find('#start_date').text).to eq(today.strftime('%A, %B %-d. %Y'))
|
||||
expect(find('#end_date').text).to eq((today + 6).strftime('%A, %B %-d. %Y'))
|
||||
|
||||
|
|
@ -38,11 +40,11 @@ feature Conference do
|
|||
end
|
||||
|
||||
scenario 'update cfp', feature: true, js: true do
|
||||
conference.program.cfp = create(:cfp)
|
||||
create(:cfp, program: conference.program)
|
||||
expected_count = Cfp.count
|
||||
|
||||
sign_in organizer
|
||||
visit admin_conference_program_cfp_path(conference.short_title)
|
||||
visit admin_conference_program_cfp_path(conference.short_title, conference.program.cfp)
|
||||
click_link 'Edit'
|
||||
|
||||
# Validate update with empty start date will not saved
|
||||
|
|
@ -65,6 +67,8 @@ feature Conference do
|
|||
# Validations
|
||||
expect(flash)
|
||||
.to eq('Call for papers successfully updated.')
|
||||
|
||||
visit admin_conference_program_cfp_path(conference.short_title, conference.program.cfp)
|
||||
expect(find('#start_date').text).to eq(today.strftime('%A, %B %-d. %Y'))
|
||||
expect(find('#end_date').text).to eq((today + 14).strftime('%A, %B %-d. %Y'))
|
||||
expect(Cfp.count).to eq(expected_count)
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ feature 'Version' do
|
|||
cfp.destroy
|
||||
|
||||
visit admin_revision_history_path
|
||||
expect(page).to have_text("Someone (probably via the console) created new cfp in conference #{conference.short_title}")
|
||||
expect(page).to have_text("Someone (probably via the console) updated start date and end date of cfp in conference #{conference.short_title}")
|
||||
expect(page).to have_text("Someone (probably via the console) deleted cfp in conference #{conference.short_title}")
|
||||
expect(page).to have_text("Someone (probably via the console) created new cfp for events in conference #{conference.short_title}")
|
||||
expect(page).to have_text("Someone (probably via the console) updated start date and end date of cfp for events in conference #{conference.short_title}")
|
||||
expect(page).to have_text("Someone (probably via the console) deleted cfp for events in conference #{conference.short_title}")
|
||||
end
|
||||
|
||||
scenario 'display changes in registration_period', feature: true, versioning: true, js: true do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue