aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-01-02 13:23:20 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2013-01-02 13:23:20 -0800
commite5ee5a9d24f897bb8999bc6d3f47edc54917db99 (patch)
tree707c21d3cce9e0a6250ab8d00bf39428942e841d /actionpack/test
parent2aa70bd61a5c4a55dffa79fb6da9b8c8d6dd8b69 (diff)
parent204109eac9708d615bd88d60b0b7e5d265941423 (diff)
downloadrails-e5ee5a9d24f897bb8999bc6d3f47edc54917db99.tar.gz
rails-e5ee5a9d24f897bb8999bc6d3f47edc54917db99.tar.bz2
rails-e5ee5a9d24f897bb8999bc6d3f47edc54917db99.zip
Merge branch '3-2-stable' into 3-2-secmerge
* 3-2-stable: fix block.arity raise nil error when not given a block to "content_tag_for" removes the Ajax on Rails early draft Revert "Merge pull request #8665 from senny/8661_should_not_append_charset_if_already_present" backport #8662, charset should not be appended for `head` responses Revert "Fix `validates_presence_of` with `:allow_nil` or `:allow_blank` options." Fix `validates_presence_of` with `:allow_nil` or `:allow_blank` options. backport #8616, quote column names in generated fixture files
Diffstat (limited to 'actionpack/test')
-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 }