diff options
author | Waynn Lue <waynnlue@gmail.com> | 2011-07-29 17:43:05 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-08-13 16:22:29 -0700 |
commit | 68c4b66015dd17e1a91a8ddc90b634d5cfc0f9ff (patch) | |
tree | 689b029d5f057ac3db093f94612394df2f9912de /actionpack/test | |
parent | 66e114cd0c0fada80fb3487262a1f578ac910437 (diff) | |
download | rails-68c4b66015dd17e1a91a8ddc90b634d5cfc0f9ff.tar.gz rails-68c4b66015dd17e1a91a8ddc90b634d5cfc0f9ff.tar.bz2 rails-68c4b66015dd17e1a91a8ddc90b634d5cfc0f9ff.zip |
fix stringify_keys destructive behavior for most FormTagHelper functions
add four new tests to verify that the other three methods that called stringify_keys! are fixed. verified that the tests break in master without the code patch. Closes #2355
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/form_tag_helper_test.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/actionpack/test/template/form_tag_helper_test.rb b/actionpack/test/template/form_tag_helper_test.rb index 979251bfd1..ad31812273 100644 --- a/actionpack/test/template/form_tag_helper_test.rb +++ b/actionpack/test/template/form_tag_helper_test.rb @@ -505,6 +505,30 @@ class FormTagHelperTest < ActionView::TestCase expected = %(<fieldset class="format">Hello world!</fieldset>) assert_dom_equal expected, output_buffer end + + def test_text_area_tag_options_symbolize_keys_side_effects + options = { :option => "random_option" } + actual = text_area_tag "body", "hello world", options + assert_equal options, { :option => "random_option" } + end + + def test_submit_tag_options_symbolize_keys_side_effects + options = { :option => "random_option" } + actual = submit_tag "submit value", options + assert_equal options, { :option => "random_option" } + end + + def test_button_tag_options_symbolize_keys_side_effects + options = { :option => "random_option" } + actual = button_tag "button value", options + assert_equal options, { :option => "random_option" } + end + + def test_image_submit_tag_options_symbolize_keys_side_effects + options = { :option => "random_option" } + actual = image_submit_tag "submit source", options + assert_equal options, { :option => "random_option" } + end def protect_against_forgery? false |