diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-17 22:47:28 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-01-18 00:44:25 -0200 |
commit | 69512e1a0e5adf1bcfbda7aee7d75ea2b183fb50 (patch) | |
tree | 6a03310e1131ced46473675a92eea495c566d33d /actionpack/test | |
parent | f4551ca7ac75d1b500d5c20a8571dcd43bda2526 (diff) | |
download | rails-69512e1a0e5adf1bcfbda7aee7d75ea2b183fb50.tar.gz rails-69512e1a0e5adf1bcfbda7aee7d75ea2b183fb50.tar.bz2 rails-69512e1a0e5adf1bcfbda7aee7d75ea2b183fb50.zip |
Add test for content tag with prefix and extra html options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/record_tag_helper_test.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/actionpack/test/template/record_tag_helper_test.rb b/actionpack/test/template/record_tag_helper_test.rb index ec777d15c4..247704928e 100644 --- a/actionpack/test/template/record_tag_helper_test.rb +++ b/actionpack/test/template/record_tag_helper_test.rb @@ -33,8 +33,8 @@ class RecordTagHelperTest < ActionView::TestCase end def test_content_tag_for - expected = %(<li class="post bar" id="post_45"></li>) - actual = content_tag_for(:li, @post, :class => 'bar') { } + expected = %(<li class="post" id="post_45"></li>) + actual = content_tag_for(:li, @post) { } assert_dom_equal expected, actual end @@ -44,9 +44,15 @@ class RecordTagHelperTest < ActionView::TestCase assert_dom_equal expected, actual end - def test_content_tag_for_with_extra_html_tags + def test_content_tag_for_with_extra_html_options expected = %(<tr class="post bar" id="post_45" style='background-color: #f0f0f0'></tr>) - actual = content_tag_for(:tr, @post, {:class => "bar", :style => "background-color: #f0f0f0"}) { } + actual = content_tag_for(:tr, @post, :class => "bar", :style => "background-color: #f0f0f0") { } + assert_dom_equal expected, actual + end + + def test_content_tag_for_with_prefix_and_extra_html_options + expected = %(<tr class="archived_post bar" id="archived_post_45" style='background-color: #f0f0f0'></tr>) + actual = content_tag_for(:tr, @post, :archived, :class => "bar", :style => "background-color: #f0f0f0") { } assert_dom_equal expected, actual end |