diff options
author | Vasiliy Ermolovich <younash@gmail.com> | 2012-02-23 22:04:09 +0300 |
---|---|---|
committer | Vasiliy Ermolovich <younash@gmail.com> | 2012-02-23 22:04:09 +0300 |
commit | f0a5d325375d9f453d4cc6c6bf555561e52d4ea7 (patch) | |
tree | 72bee6513d826ad5dc8997fce2dd1792bb85fbe7 /actionpack/test/template | |
parent | af988ef5b07cc18bc706e741c6a99652faaf00b4 (diff) | |
download | rails-f0a5d325375d9f453d4cc6c6bf555561e52d4ea7.tar.gz rails-f0a5d325375d9f453d4cc6c6bf555561e52d4ea7.tar.bz2 rails-f0a5d325375d9f453d4cc6c6bf555561e52d4ea7.zip |
correct fetching :name option in form fields
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index e4cb7e02a0..61d728ce66 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -305,6 +305,11 @@ class FormHelperTest < ActionView::TestCase assert_dom_equal expected, text_field("post", "title", :value => nil) end + def test_text_field_with_nil_name + expected = '<input id="post_title" size="30" type="text" value="Hello World" />' + assert_dom_equal expected, text_field("post", "title", :name => nil) + end + def test_text_field_doesnt_change_param_values object_name = 'post[]' expected = '<input id="post_123_title" name="post[123][title]" size="30" type="text" value="Hello World" />' |