aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-17 23:05:18 -0200
committerPrem Sichanugrist <s@sikachu.com>2012-04-27 18:34:20 -0400
commit7006e975ac29e48cb9645733df04b9841bb2c29d (patch)
tree97c406055e4a4aa9d60948a728ff0dcd0217c5aa /actionpack/test/template
parent05bee990b4bd0ce3b02e75399c857e168f41edb6 (diff)
downloadrails-7006e975ac29e48cb9645733df04b9841bb2c29d.tar.gz
rails-7006e975ac29e48cb9645733df04b9841bb2c29d.tar.bz2
rails-7006e975ac29e48cb9645733df04b9841bb2c29d.zip
Do not mutate options hash
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/record_tag_helper_test.rb6
1 files changed, 6 insertions, 0 deletions
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