aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/form_helper_test.rb5
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 a7ceb6b30f..69aef4e5f1 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -64,6 +64,11 @@ class FormHelperTest < Test::Unit::TestCase
assert_dom_equal expected, text_field("post", "title", :size => 35)
end
+ def test_text_field_with_prefix
+ expected = '<input id="book_post_title" name="book[post][title]" size="35" type="text" value="Hello World" />'
+ assert_dom_equal expected, text_field("post", "title", :size => 35, :prefix => :book)
+ end
+
def test_text_field_assuming_size
expected = '<input id="post_title" maxlength="35" name="post[title]" size="35" type="text" value="Hello World" />'
assert_dom_equal expected, text_field("post", "title", "maxlength" => 35)