This commit is contained in:
rajavi-mishra 2021-04-25 01:02:41 -07:00 committed by CactusPuppy
parent 5121e0ba29
commit 60b5e9a1c9
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82

View file

@ -212,4 +212,26 @@ feature Event do
expect(page.find('#event_submission_text').value).to eq(event_type.submission_instructions) expect(page.find('#event_submission_text').value).to eq(event_type.submission_instructions)
end end
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 end