Skip to content

Commit

Permalink
Added regression test for InstanceTag#content_tag so that it can take…
Browse files Browse the repository at this point in the history
… a block
  • Loading branch information
Alex Kwiatkowski, Ben Moss & Peter Jaros committed Oct 13, 2011
1 parent 70b3829 commit c500c16
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/haml/template_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,21 @@ def test_av_block_deprecation_warning
end
end

if defined?(ActionView::Helpers::InstanceTag)
def test_form_builder_label_with_block
assert_equal(<<HTML, render(<<HAML, :action_view))
<form #{rails_form_attr}action="" method="post">#{rails_form_opener}
<label for="article_title">Block content
</label>
</form>
HTML
#{rails_block_helper_char} form_for #{form_for_calling_convention(:article)}, :url => '' do |f|
= f.label :title do
Block content
HAML
end
end

## XSS Protection Tests

# In order to enable these, either test against Rails 3.0
Expand Down

0 comments on commit c500c16

Please sign in to comment.