From 5e79094fc1dbb62e27cf21c0f18b586a26d5de46 Mon Sep 17 00:00:00 2001 From: Stephen Celis Date: Sun, 17 Oct 2010 08:18:25 -0500 Subject: HTML5 data attribute helpers [#5825 state:resolved]. --- actionpack/test/template/tag_helper_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index c742683821..60b466a9ff 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionpack/test/template/tag_helper_test.rb @@ -110,4 +110,11 @@ class TagHelperTest < ActionView::TestCase def test_disable_escaping assert_equal '', tag('a', { :href => '&' }, false, false) end + + def test_data_attributes + ['data', :data].each { |data| + assert_dom_equal '', + tag('a', { data => { :a_number => 1, :string => 'hello', :symbol => :foo, :array => [1, 2, 3], :hash => { :key => 'value'} } }) + } + end end -- cgit v1.2.3