test RSS format

This commit is contained in:
Joerg Reichert 2016-04-10 14:47:22 +02:00
parent ea83cd6f00
commit 2934bea7db

View file

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