mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 15:43:14 +01:00
test RSS format
This commit is contained in:
parent
ea83cd6f00
commit
2934bea7db
1 changed files with 15 additions and 0 deletions
|
@ -28,6 +28,21 @@ RSpec.describe SearchController, type: :controller, elasticsearch: true do
|
||||||
get :index, body: 'leipzig'
|
get :index, body: 'leipzig'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
it "returns rss" do
|
||||||
|
get :index, :format => "rss", body: 'leipzig'
|
||||||
|
expect(response).to be_success
|
||||||
|
expect(response).to render_template(:index)
|
||||||
|
expect(response.content_type).to eq("application/rss+xml")
|
||||||
|
expect(response.body).to have_tag "rss" do
|
||||||
|
with_tag "channel" do
|
||||||
|
with_tag "title"
|
||||||
|
with_tag "description"
|
||||||
|
with_tag "link"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue