diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-16 14:47:54 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-16 14:47:54 -0200 |
commit | 1f5df859d8c8e35144b1783f136d34ab9b2099a9 (patch) | |
tree | 7eb933c61b42ffe79d4a6f09fd55d507a3fc26c7 | |
parent | 43ab5433a78fede6c1499d7305661dc3cd205e53 (diff) | |
parent | 2038c2c53dafcebef32b4f1e31a97368b1b267e4 (diff) | |
download | rails-1f5df859d8c8e35144b1783f136d34ab9b2099a9.tar.gz rails-1f5df859d8c8e35144b1783f136d34ab9b2099a9.tar.bz2 rails-1f5df859d8c8e35144b1783f136d34ab9b2099a9.zip |
Merge pull request #18054 from jonatack/add_content_tag_test
Test to ensure content_tag works when fixing #17661
-rw-r--r-- | actionview/test/template/tag_helper_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionview/test/template/tag_helper_test.rb b/actionview/test/template/tag_helper_test.rb index 7fc798dec9..d037447567 100644 --- a/actionview/test/template/tag_helper_test.rb +++ b/actionview/test/template/tag_helper_test.rb @@ -50,6 +50,11 @@ class TagHelperTest < ActionView::TestCase assert_dom_equal "<div>Hello world!</div>", buffer end + def test_content_tag_with_block_in_erb_containing_non_displayed_erb + buffer = render_erb("<%= content_tag(:p) do %><% 1 %><% end %>") + assert_dom_equal "<p></p>", buffer + end + def test_content_tag_with_block_and_options_in_erb buffer = render_erb("<%= content_tag(:div, :class => 'green') do %>Hello world!<% end %>") assert_dom_equal %(<div class="green">Hello world!</div>), buffer |