testing
This commit is contained in:
parent
5121e0ba29
commit
60b5e9a1c9
1 changed files with 22 additions and 0 deletions
|
|
@ -212,4 +212,26 @@ feature Event do
|
|||
expect(page.find('#event_submission_text').value).to eq(event_type.submission_instructions)
|
||||
end
|
||||
end
|
||||
|
||||
context 'as a user, looking at a conference with scheduled events' do
|
||||
before(:each) do
|
||||
@user = create(:user)
|
||||
@program = conference.program
|
||||
@selected_schedule = create(:schedule, program: @program)
|
||||
@program.update_attributes!(selected_schedule: @selected_schedule)
|
||||
@scheduled_event1 = create(:event, program: @program, state: 'confirmed', abstract: '`markdown`')
|
||||
event_schedule1 = create(:event_schedule, event: @scheduled_event1, schedule: @selected_schedule, start_time: conference.start_hour + 1.hour)
|
||||
end
|
||||
|
||||
scenario 'for a scheduled event, can add an event to google calendar if signed in', feature: true, js: true do
|
||||
sign_in @user
|
||||
visit conference_program_proposal_path(conference.short_title, @scheduled_event1.id)
|
||||
expect(page).to have_content('Add to Google Calendar (beta)')
|
||||
end
|
||||
|
||||
scenario 'for a scheduled event, cannot add an event to google calendar if not signed on', feature: true, js: true do
|
||||
visit conference_program_proposal_path(conference.short_title, @scheduled_event1.id)
|
||||
expect(page).not_to have_content('Add to Google Calendar (beta)')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue