Skip to content

Commit

Permalink
Fixes controller name in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krapans authored and adrienpoly committed Oct 20, 2023
1 parent f0f840b commit 243937f
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/controllers/feed_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
require "test_helper"

class FeedControllerTest < ActionDispatch::IntegrationTest
setup do
@talks = talks(:one, :two)
frozen_date_time = DateTime.new(2022, 1, 15, 10, 0, 0)
@talks.each do |talk|
talk.update!(created_at: frozen_date_time, updated_at: frozen_date_time)
end
end

test "should get rss format" do
get feed_url(format: :rss)

assert_response :success
assert_equal "/feed.rss", path
assert_equal "application/rss+xml; charset=utf-8", response.content_type
assert_equal File.read("test/fixtures/files/feed.rss"), response.parsed_body
end

test "should get atom format" do
get feed_url(format: :atom)

assert_response :success
assert_equal "/feed.atom", path
assert_equal "application/atom+xml; charset=utf-8", response.content_type
assert_equal File.read("test/fixtures/files/feed.atom"), response.parsed_body
end
end

0 comments on commit 243937f

Please sign in to comment.