aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-08-04 09:29:18 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-08-04 09:29:18 -0700
commitcf96649bb7e2dca85455d53b97ad810b9ec814c9 (patch)
treee012cb6b6aa49bca1a8e436029f89795c85e3ae3 /actionpack/test/template
parentf000d4e5faeabafece59a46911a74e876785b785 (diff)
parent54b83566ccb55ae4a9bdb163a6224fa946814457 (diff)
downloadrails-cf96649bb7e2dca85455d53b97ad810b9ec814c9.tar.gz
rails-cf96649bb7e2dca85455d53b97ad810b9ec814c9.tar.bz2
rails-cf96649bb7e2dca85455d53b97ad810b9ec814c9.zip
Merge pull request #2356 from waynn/fix_symbol
fix stringify_keys destructive behavior for most FormTagHelper functions
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/form_tag_helper_test.rb24
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