Skip to content

Commit 243937f

Browse files
krapansadrienpoly
authored andcommitted
Fixes controller name in tests
1 parent f0f840b commit 243937f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
require "test_helper"
2+
3+
class FeedControllerTest < ActionDispatch::IntegrationTest
4+
setup do
5+
@talks = talks(:one, :two)
6+
frozen_date_time = DateTime.new(2022, 1, 15, 10, 0, 0)
7+
@talks.each do |talk|
8+
talk.update!(created_at: frozen_date_time, updated_at: frozen_date_time)
9+
end
10+
end
11+
12+
test "should get rss format" do
13+
get feed_url(format: :rss)
14+
15+
assert_response :success
16+
assert_equal "/feed.rss", path
17+
assert_equal "application/rss+xml; charset=utf-8", response.content_type
18+
assert_equal File.read("test/fixtures/files/feed.rss"), response.parsed_body
19+
end
20+
21+
test "should get atom format" do
22+
get feed_url(format: :atom)
23+
24+
assert_response :success
25+
assert_equal "/feed.atom", path
26+
assert_equal "application/atom+xml; charset=utf-8", response.content_type
27+
assert_equal File.read("test/fixtures/files/feed.atom"), response.parsed_body
28+
end
29+
end

0 commit comments

Comments
 (0)