From bf8b101dd65eb261644c67fdc0e40bf54b9f2564 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 4 Sep 2006 20:43:38 +0000 Subject: Fixed that AssetTagHelper#image_tag and others using compute_public_path should not modify the incoming source argument (closes #5102) [eule@space.ch] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5003 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/asset_tag_helper_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/test/template') diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index bc386a535d..e8320291fe 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -140,6 +140,15 @@ class AssetTagHelperTest < Test::Unit::TestCase ENV["RAILS_ASSET_ID"] = "4500" assert_equal %(Rails), image_tag("rails.png") end + + def test_url_dup_image_tag + Object.send(:const_set, :RAILS_ROOT, File.dirname(__FILE__) + "/../fixtures/") + img_url = '/images/rails.png' + url_copy = img_url.dup + image_tag(img_url) + + assert_equal url_copy, img_url + end end class AssetTagHelperNonVhostTest < Test::Unit::TestCase -- cgit v1.2.3