From afd288cf8141eca321061cb00879f52108d68013 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 22 Oct 2006 23:41:11 +0000 Subject: Fixed that setting RAILS_ASSET_ID to "" should not add a trailing slash after assets (closes #6454) [BobSilva/chrismear] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5335 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/asset_tag_helper_test.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'actionpack/test') diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index e8320291fe..4b941921cf 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -70,7 +70,8 @@ class AssetTagHelperTest < Test::Unit::TestCase %(stylesheet_link_tag("/dir/file")) => %(), %(stylesheet_link_tag("dir/file")) => %(), %(stylesheet_link_tag("style", :media => "all")) => %(), - %(stylesheet_link_tag("random.styles", "/css/stylish")) => %(\n) + %(stylesheet_link_tag("random.styles", "/css/stylish")) => %(\n), + %(stylesheet_link_tag("http://www.example.com/styles/style")) => %() } ImagePathToTag = { @@ -141,6 +142,12 @@ class AssetTagHelperTest < Test::Unit::TestCase assert_equal %(Rails), image_tag("rails.png") end + def test_preset_empty_asset_id + Object.send(:const_set, :RAILS_ROOT, File.dirname(__FILE__) + "/../fixtures/") + ENV["RAILS_ASSET_ID"] = "" + 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' -- cgit v1.2.3