You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- a/spec/controllers/schedules_controller_spec.rb+++ b/spec/controllers/schedules_controller_spec.rb@@ -8,9 +8,20 @@ describe SchedulesController do
describe 'GET #show' do
+ before :each do+ conference.program.update_attribute(:schedule_public, true)+ create_pair(:event_scheduled, program: conference.program)+ end++ context 'iCalendar' do+ before :each do+ get :show, params: { conference_id: conference.short_title, format: :ics }+ end++ it 'returns iCalendar data' do+ expect(response.content_type).to start_with('text/calendar')+ expect(response.body).to start_with('BEGIN:VCALENDAR')+ end+ end+
context 'XML' do
before :each do
- conference.program.schedule_public = true- conference.program.save!- create(:event_scheduled, program: conference.program)- create(:event_scheduled, program: conference.program)-
get :show, params: { conference_id: conference.short_title, format: :xml }
--- a/spec/controllers/conferences_controller_spec.rb+++ b/spec/controllers/conferences_controller_spec.rb@@ -51,2 +51,10 @@ describe ConferencesController do
+ describe 'GET #calendar' do+ it 'returns iCalendar data' do+ get :calendar, params: { format: :ics, full: true }++ expect(response.content_type).to start_with('text/calendar')+ expect(response.body).to start_with('BEGIN:VCALENDAR')+ end+ end
end
Other information
#2717 added this feature without tests, so it’s not clear that it ever worked. #2977 apparently attempted a solution but didn’t address CanCanCan abilities.
The text was updated successfully, but these errors were encountered:
I'm submitting a…
Current behavior
Both of the iCalendar routes are unusable:
/conferences/…/schedule.ics
raisesNoMethodError: undefined method 'icalendar_proposals'
./calendar.ics
redirects to/
without explanation.Expected correct behavior
Both endpoints should return iCalendar data.
Steps to reproduce
Minimal tests
Other information
#2717 added this feature without tests, so it’s not clear that it ever worked. #2977 apparently attempted a solution but didn’t address CanCanCan abilities.
The text was updated successfully, but these errors were encountered: