Permalink
Browse files

Adding one test case for label with block

  • Loading branch information...
1 parent 0ac47bd commit 7cc373e4a052b1e90a916f7cae930a3da6613625 @rafaelfranca rafaelfranca committed Jan 16, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 actionpack/test/template/form_helper_test.rb
@@ -232,6 +232,10 @@ def test_label_with_block
assert_dom_equal('<label for="post_title">The title, please:</label>', label(:post, :title) { "The title, please:" })
end
+ def test_label_with_block_and_options
+ assert_dom_equal('<label for="my_for">The title, please:</label>', label(:post, :title, "for" => "my_for") { "The title, please:" })
+ end
+
def test_label_with_block_in_erb
assert_equal "<label for=\"post_message\">\n Message\n <input id=\"post_message\" name=\"post[message]\" size=\"30\" type=\"text\" />\n</label>", view.render("test/label_with_block")
end

0 comments on commit 7cc373e

Please sign in to comment.