aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/form_helper_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb
index a7ceb6b30f..f7d51b2f2d 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -163,6 +163,12 @@ class FormHelperTest < Test::Unit::TestCase
)
end
+ def test_label
+ assert_dom_equal('<label for="post_body">Body</label>', label("post", "body"))
+ assert_dom_equal('<label for="post_body">Super body</label>', label("post", "body", :text => "Super body"))
+ assert_dom_equal('<label for="post_body" class="strong">Super body</label>', label("post", "body", :text => "Super body", :class => "strong"))
+ end
+
def test_explicit_name
assert_dom_equal(
'<input id="post_title" name="dont guess" size="30" type="text" value="Hello World" />', text_field("post", "title", "name" => "dont guess")