diff options
author | Kir Shatrov <shatrov@me.com> | 2017-06-29 20:25:54 +0300 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2017-06-30 17:29:13 +0300 |
commit | da895edf2e43d8c03089df7042a5bff7ef15fff0 (patch) | |
tree | dc0e043678882fb41299c9dd1427fa31fed9e9ab /actionview | |
parent | 5fe2a4f929fff7fa725545c47ac0f9372d8c643d (diff) | |
download | rails-da895edf2e43d8c03089df7042a5bff7ef15fff0.tar.gz rails-da895edf2e43d8c03089df7042a5bff7ef15fff0.tar.bz2 rails-da895edf2e43d8c03089df7042a5bff7ef15fff0.zip |
Fallback Parameters#to_s to Hash#to_s
Fixes https://github.com/rails/rails/issues/29617
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/test/template/form_tag_helper_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionview/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb index 084c540139..c13d0c32ae 100644 --- a/actionview/test/template/form_tag_helper_test.rb +++ b/actionview/test/template/form_tag_helper_test.rb @@ -345,6 +345,12 @@ class FormTagHelperTest < ActionView::TestCase assert_dom_equal expected, actual end + def test_text_field_tag_with_ac_parameters + actual = text_field_tag "title", ActionController::Parameters.new(key: "value") + expected = %(<input id="title" name="title" type="text" value="{"key"=>"value"}" />) + assert_dom_equal expected, actual + end + def test_text_field_tag_size_string actual = text_field_tag "title", "Hello!", "size" => "75" expected = %(<input id="title" name="title" size="75" type="text" value="Hello!" />) |