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.
This commit is contained in:
Kushal SM 2026-02-15 22:39:19 +05:30 committed by Henne Vogelsang
parent 1958ac2b10
commit 3b1f7e5a00

View file

@ -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