Commit graph

7 commits

Author SHA1 Message Date
Asish Kumar
c5e84221c2 Make iCalendar feed routes return calendar data
Both iCalendar routes were unusable:

* `/conferences/.../schedule.ics` raised
  `NoMethodError: undefined method 'icalendar_proposals'` because the
  `ConferenceHelper#icalendar_proposals` helper isn't auto-included in
  controllers; the action crashed before rendering.

* `/calendar.ics` silently redirected to `/`. The controller goes
  through `load_and_authorize_resource`, which authorises `:calendar`
  on `Conference` and is rejected for anonymous visitors because no
  ability grants it — CanCan's `AccessDenied` rescue redirects to
  root.

The helper is invoked through the controller `helpers` proxy so it
works in both contexts, and the calendar action is opted out of
resource loading and explicitly marked as not requiring authorization
since it serves a public feed across conferences. The helper is also
hardened so that proposals missing a room, difficulty level, track,
event type or scheduled time produce a valid event instead of
crashing the whole feed.
2026-05-14 11:02:49 +05:30
Andrew Kvalheim
e30880229c Use be_successful instead of be_success
Rails 5.2 warns:

> The `success?` predicate is deprecated and will be removed in Rails 6.0.
> Please use `successful?` as provided by Rack::Response::Helpers.

RSpec correspondingly provides `be_successful`.
2022-01-23 14:06:02 -08:00
Ana María Martínez Gómez
d1180e2767
Use keyword arguments in tests
Raisl 5.1 removes support for non-keyword arguments in `#process`,
`#get`, `#post`, `#patch`, `#put`, `#delete`, and `#head` for the
`ActionDispatch::IntegrationTest` and `ActionController::TestCase`
classes. This means we have to add `params` everywhere in the controller
tests.
2019-05-14 14:10:36 +02:00
James Mason
6d31dfeef4 Add frozen_string_literal magic comment
re: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FrozenStringLiteralComment
2018-05-09 06:54:26 -07:00
Ana
1989a33da1 Test namings
Test namings in event_schedules and schedules controllers.
2016-08-11 15:11:27 +02:00
Ana
a578167cf5 Event model improvements
- Drop selected_event_schedule function
- Rename scheduled_room and scheduled_start_time to room and time as if there is no selected_schedule, the event is not scheduled.
2016-08-11 15:11:27 +02:00
Ana
71dab6b79c SchedulesController introduced
The actions #schedule and #events were moved from conference controller to the new controller
2016-08-11 15:11:27 +02:00