aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/tag_helper_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-05-02 22:30:41 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-05-02 22:30:41 +0000
commitedaf6baea72c48dc90af3cb6b0a1078228f85f89 (patch)
treef732f5028453c1cab4800229feed26de9834bf6c /actionpack/test/template/tag_helper_test.rb
parent0778464168960a830b806f66a200e86a163a5831 (diff)
downloadrails-edaf6baea72c48dc90af3cb6b0a1078228f85f89.tar.gz
rails-edaf6baea72c48dc90af3cb6b0a1078228f85f89.tar.bz2
rails-edaf6baea72c48dc90af3cb6b0a1078228f85f89.zip
Fixed that content_tag with a block will just return the result instead of concate it if not used in a ERb view #7857, #7432 [michael.niessner]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6652 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/tag_helper_test.rb')
-rw-r--r--actionpack/test/template/tag_helper_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/tag_helper_test.rb b/actionpack/test/template/tag_helper_test.rb
index 342c3843a1..b839d53f6b 100644
--- a/actionpack/test/template/tag_helper_test.rb
+++ b/actionpack/test/template/tag_helper_test.rb
@@ -47,6 +47,11 @@ class TagHelperTest < Test::Unit::TestCase
assert_dom_equal %(<div class="green">Hello world!</div>), _erbout
end
+ def test_content_tag_with_block_and_options_outside_of_action_view
+ assert_equal content_tag("a", "Create", :href => "create"),
+ content_tag("a", "href" => "create") { "Create" }
+ end
+
def test_cdata_section
assert_equal "<![CDATA[<hello world>]]>", cdata_section("<hello world>")
end