diff options
author | Jeffrey Hardy <packagethief@gmail.com> | 2008-10-22 15:42:36 -0400 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-10-23 19:16:26 -0700 |
commit | 3bcadc9290c7fab2491e900458ec5b608a037718 (patch) | |
tree | 2a1605a6b630595e84e6dfb3434d9982fc6fe434 /actionpack/test/controller/html-scanner/cdata_node_test.rb | |
parent | 1a1822726189f3cfff305dea62e5cfbdbc0da577 (diff) | |
download | rails-3bcadc9290c7fab2491e900458ec5b608a037718.tar.gz rails-3bcadc9290c7fab2491e900458ec5b608a037718.tar.bz2 rails-3bcadc9290c7fab2491e900458ec5b608a037718.zip |
Fix incorrect closing CDATA delimiter. Add tests for CDATA nodes.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/test/controller/html-scanner/cdata_node_test.rb')
-rw-r--r-- | actionpack/test/controller/html-scanner/cdata_node_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/test/controller/html-scanner/cdata_node_test.rb b/actionpack/test/controller/html-scanner/cdata_node_test.rb new file mode 100644 index 0000000000..1822cc565a --- /dev/null +++ b/actionpack/test/controller/html-scanner/cdata_node_test.rb @@ -0,0 +1,15 @@ +require 'abstract_unit' + +class CDATANodeTest < Test::Unit::TestCase + def setup + @node = HTML::CDATA.new(nil, 0, 0, "<p>howdy</p>") + end + + def test_to_s + assert_equal "<![CDATA[<p>howdy</p>]]>", @node.to_s + end + + def test_content + assert_equal "<p>howdy</p>", @node.content + end +end |