aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/html-scanner/cdata_node_test.rb
blob: 0bab2bcb3329a0d8ee145126aa3dfa415e5883c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'abstract_unit'
require 'action_view/vendor/html-scanner/html/node'

class CDATANodeTest < ActiveSupport::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