diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-05-20 14:02:50 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-05-20 14:02:50 -0700 |
commit | 68a454c2afcbfc1bd71c06e0a7d9cd48d5cf4412 (patch) | |
tree | e8eef72c46e7c548d50bf4da27fcb5bc9a899745 /actionpack/test | |
parent | fe9731ee674b8d7d7e06f81441fceb0499734493 (diff) | |
parent | 39b9c943b7ec5181c19461d319d8c610ea1bf941 (diff) | |
download | rails-68a454c2afcbfc1bd71c06e0a7d9cd48d5cf4412.tar.gz rails-68a454c2afcbfc1bd71c06e0a7d9cd48d5cf4412.tar.bz2 rails-68a454c2afcbfc1bd71c06e0a7d9cd48d5cf4412.zip |
Merge pull request #6410 from Bodacious/tag_helper_data_fix_3-2-stable
TagHelper creates invalid data attributes when value is a BigDecimal
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/tag_helper_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb index 6c325d5abb..e36295569e 100644 --- a/actionpack/test/template/tag_helper_test.rb +++ b/actionpack/test/template/tag_helper_test.rb @@ -113,8 +113,8 @@ class TagHelperTest < ActionView::TestCase def test_data_attributes ['data', :data].each { |data| - assert_dom_equal '<a data-a-number="1" data-array="[1,2,3]" data-hash="{"key":"value"}" data-string="hello" data-symbol="foo" />', - tag('a', { data => { :a_number => 1, :string => 'hello', :symbol => :foo, :array => [1, 2, 3], :hash => { :key => 'value'} } }) + assert_dom_equal '<a data-a-float="3.14" data-a-big-decimal="-123.456" data-a-number="1" data-array="[1,2,3]" data-hash="{"key":"value"}" data-string="hello" data-symbol="foo" />', + 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'} } }) } end end |