From 7006e975ac29e48cb9645733df04b9841bb2c29d Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Tue, 17 Jan 2012 23:05:18 -0200 Subject: Do not mutate options hash --- actionpack/test/template/record_tag_helper_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/record_tag_helper_test.rb b/actionpack/test/template/record_tag_helper_test.rb index 80d6f130ed..b4db6d9a71 100644 --- a/actionpack/test/template/record_tag_helper_test.rb +++ b/actionpack/test/template/record_tag_helper_test.rb @@ -100,4 +100,10 @@ class RecordTagHelperTest < ActionView::TestCase result = content_tag_for(:li, [post_1, post_2]) { |post| concat post.body } assert result.html_safe? end + + def test_content_tag_for_does_not_change_options_hash + options = { :class => "important" } + result = content_tag_for(:li, @post, options) { } + assert_equal({ :class => "important" }, options) + end end -- cgit v1.2.3