aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/record_tag_helper_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-02 04:05:05 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-02 04:05:05 -0800
commit204109eac9708d615bd88d60b0b7e5d265941423 (patch)
tree408f5745eb670b9b24c671ab8a25be2b58579b7e /actionpack/test/template/record_tag_helper_test.rb
parentb366ec51efa14341cb568790c42b8c273d4f4d90 (diff)
parentea881ca85a1a9df3c25e2ee8668d98416a5c1acb (diff)
downloadrails-204109eac9708d615bd88d60b0b7e5d265941423.tar.gz
rails-204109eac9708d615bd88d60b0b7e5d265941423.tar.bz2
rails-204109eac9708d615bd88d60b0b7e5d265941423.zip
Merge pull request #8640 from jasl/3-2-stable
fix block.arity will raise nil error
Diffstat (limited to 'actionpack/test/template/record_tag_helper_test.rb')
-rw-r--r--actionpack/test/template/record_tag_helper_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/record_tag_helper_test.rb b/actionpack/test/template/record_tag_helper_test.rb
index f33471ab28..3cb5997a83 100644
--- a/actionpack/test/template/record_tag_helper_test.rb
+++ b/actionpack/test/template/record_tag_helper_test.rb
@@ -81,6 +81,14 @@ class RecordTagHelperTest < ActionView::TestCase
assert_dom_equal expected, actual
end
+ def test_content_tag_for_collection_without_given_block
+ post_1 = RecordTagPost.new.tap { |post| post.id = 101; post.body = "Hello!"; post.persisted = true }
+ post_2 = RecordTagPost.new.tap { |post| post.id = 102; post.body = "World!"; post.persisted = true }
+ expected = %(<li class="record_tag_post" id="record_tag_post_101"></li>\n<li class="record_tag_post" id="record_tag_post_102"></li>)
+ actual = content_tag_for(:li, [post_1, post_2])
+ assert_dom_equal expected, actual
+ end
+
def test_div_for_collection
post_1 = RecordTagPost.new.tap { |post| post.id = 101; post.body = "Hello!"; post.persisted = true }
post_2 = RecordTagPost.new.tap { |post| post.id = 102; post.body = "World!"; post.persisted = true }