From 3b1f7e5a00d631d48cf374df28110703ba00b684 Mon Sep 17 00:00:00 2001 From: Kushal SM Date: Sun, 15 Feb 2026 22:39:19 +0530 Subject: [PATCH] fix: Add specs for the RSS feed endpoint Covers response status, content type, and that conference data is present in the rendered feed. Uses render_views to test the XML builder template output. --- spec/controllers/conferences_controller_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spec/controllers/conferences_controller_spec.rb b/spec/controllers/conferences_controller_spec.rb index c9a17d14..f83da98b 100644 --- a/spec/controllers/conferences_controller_spec.rb +++ b/spec/controllers/conferences_controller_spec.rb @@ -49,4 +49,20 @@ describe ConferencesController do end end + describe 'GET #feed' do + render_views + + it 'returns RSS feed successfully' do + get :feed, format: :rss + expect(response.response_code).to eq(200) + expect(response.content_type).to include('application/rss+xml') + end + + it 'includes conference data in the feed' do + conference # trigger let + get :feed, format: :rss + expect(response.body).to include(conference.title) + end + end + end