* Add minimal test on rss feed response * Update date to string conversion to avoid deprecation It wouldn't make sense to use a deprecated method here.
12 lines
343 B
Ruby
12 lines
343 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe "ArticlesFeed", type: :request do
|
|
let!(:article) { create(:article) }
|
|
|
|
it "returns an rss feed with published articles" do
|
|
get "/feed"
|
|
|
|
expect(response.body).to include(article.title)
|
|
expect(response.body).to include("<pubDate>#{article.published_at.to_fs(:rfc822)}</pubDate>")
|
|
end
|
|
end
|