osem-fcy/spec/controllers
Asish Kumar fae6332c36 Stop offering the schedule page when no schedule is published
The home and splash page render a link to the schedule based purely on
the `schedule_public` flag, even when an admin has not yet selected a
schedule or scheduled any events. Following that link rendered the
schedule view, which then failed inside `_carousel.html.haml` because
`@rooms` (and the selected schedule) had no data — a 500 error instead
of a graceful response.

Treat `schedule_public` as an allowance rather than an unchecked
control: introduce `Program#any_published_schedule?` (true only when
the flag is on *and* there is at least one event in a selected
schedule) and use it to decide whether to render the link from the
home and splash pages. The schedule controller now returns 404 when no
event has been scheduled, so bookmarked URLs surface as "not found"
instead of an internal server error.
2026-05-14 09:28:58 +05:30
..
admin Drop Organization from specs 2024-06-07 17:42:08 +02:00
api/v1 Use be_successful instead of be_success 2022-01-23 14:06:02 -08:00
users Rubocop autocorrections 2018-11-16 09:06:05 -08:00
application_controller_spec.rb Remove superfluous specs 2022-05-06 14:26:51 +02:00
booths_controller_spec.rb add booth in alias 2019-08-10 21:40:25 +05:30
conference_registration_controller_spec.rb Also clear ENV when manipulating it 2025-08-13 11:21:23 +02:00
conferences_controller_spec.rb Use keyword arguments in tests 2019-05-14 14:10:36 +02:00
confirmations_controller_spec.rb Fix the test failures 2022-03-30 12:39:01 +02:00
physical_ticket_controller_spec.rb Use keyword arguments in tests 2019-05-14 14:10:36 +02:00
proposals_controller_spec.rb 👋 update_attributes 2022-02-23 14:36:05 +01:00
schedules_controller_spec.rb Stop offering the schedule page when no schedule is published 2026-05-14 09:28:58 +05:30
subscriptions_controller_spec.rb Use keyword arguments in tests 2019-05-14 14:10:36 +02:00
surveys_controller_spec.rb Use keyword arguments in tests 2019-05-14 14:10:36 +02:00
tracks_controller_spec.rb Fix the test failures 2022-03-30 12:39:01 +02:00
users_controller_spec.rb Use keyword arguments in tests 2019-05-14 14:10:36 +02:00