diff options
author | PaoMar <paomarcasadiego@gmail.com> | 2014-09-03 15:03:58 -0500 |
---|---|---|
committer | PaoMar <paomarcasadiego@gmail.com> | 2014-09-03 16:14:21 -0500 |
commit | ee61b76a810ad67ca064be2922a8b481fa840043 (patch) | |
tree | f653efa7c90db7f10f071502851942afb2b314c7 /actionview/test/template | |
parent | b79ab4ca953949d953db772ba40bef2adc936fc3 (diff) | |
download | rails-ee61b76a810ad67ca064be2922a8b481fa840043.tar.gz rails-ee61b76a810ad67ca064be2922a8b481fa840043.tar.bz2 rails-ee61b76a810ad67ca064be2922a8b481fa840043.zip |
Add support for ARIA attributes in tags
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/tag_helper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionview/test/template/tag_helper_test.rb b/actionview/test/template/tag_helper_test.rb index 0ea669b3d0..ce89d5728e 100644 --- a/actionview/test/template/tag_helper_test.rb +++ b/actionview/test/template/tag_helper_test.rb @@ -156,4 +156,11 @@ class TagHelperTest < ActionView::TestCase tag('a', { data => { a_float: 3.14, a_big_decimal: BigDecimal.new("-123.456"), a_number: 1, string: 'hello', symbol: :foo, array: [1, 2, 3], hash: { key: 'value'}, string_with_quotes: 'double"quote"party"' } }) } end + + def test_aria_attributes + ['aria', :aria].each { |aria| + assert_dom_equal '<a aria-a-float="3.14" aria-a-big-decimal="-123.456" aria-a-number="1" aria-array="[1,2,3]" aria-hash="{"key":"value"}" aria-string-with-quotes="double"quote"party"" aria-string="hello" aria-symbol="foo" />', + tag('a', { aria => { a_float: 3.14, a_big_decimal: BigDecimal.new("-123.456"), a_number: 1, string: 'hello', symbol: :foo, array: [1, 2, 3], hash: { key: 'value'}, string_with_quotes: 'double"quote"party"' } }) + } + end end |