mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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:
parent
1958ac2b10
commit
3b1f7e5a00
1 changed files with 16 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue