summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/controllers/rss_controller_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/controllers/rss_controller_test.rb b/test/controllers/rss_controller_test.rb
index 00224119..4393c5fc 100644
--- a/test/controllers/rss_controller_test.rb
+++ b/test/controllers/rss_controller_test.rb
@@ -41,4 +41,19 @@ class RssControllerTest < ActionController::TestCase
41 assert_includes @response.body, "feed-inside" 41 assert_includes @response.body, "feed-inside"
42 assert_not_includes @response.body, "feed-outside" 42 assert_not_includes @response.body, "feed-outside"
43 end 43 end
44
45 test "the feed escapes markup characters in a title" do
46 updates = Node.root.children.find_by(:slug => "updates")
47 node = updates.children.create!(:slug => "feed-escaping")
48 node.reload.draft.update!(:title => %{Fnord & <b>bold</b> "quoted"},
49 :tag_list => "update")
50 node.publish_draft!
51
52 get :updates, params: { :format => :xml }
53
54 assert_response :success
55 assert_includes @response.body, "Fnord &amp; &lt;b&gt;bold&lt;/b&gt;"
56 assert_not_includes @response.body, "<b>bold</b>"
57 assert_not_includes @response.body, "&amp;amp;"
58 end
44end 59end