aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/asset_tag_helper_test.rb
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-09-30 19:10:20 +0000
committerJamis Buck <jamis@37signals.com>2005-09-30 19:10:20 +0000
commit1e08d11579f0080f086a6bfea1693826a0c09c95 (patch)
tree19882f8832382c9940a3126b0a9d4ecc9a904bfb /actionpack/test/template/asset_tag_helper_test.rb
parent11de94748e1543065748637b083984a69350b1a6 (diff)
downloadrails-1e08d11579f0080f086a6bfea1693826a0c09c95.tar.gz
rails-1e08d11579f0080f086a6bfea1693826a0c09c95.tar.bz2
rails-1e08d11579f0080f086a6bfea1693826a0c09c95.zip
Don't prepend the asset host if the string is already a fully-qualified URL
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2430 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/asset_tag_helper_test.rb')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index d5ea05bf37..9a242c6a5a 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -196,4 +196,14 @@ class AssetTagHelperNonVhostTest < Test::Unit::TestCase
assert_nothing_raised { image_tag('') }
end
+ def test_stylesheet_with_asset_host_already_encoded
+ ActionController::Base.asset_host = "http://foo.example.com"
+ result = stylesheet_link_tag("http://bar.example.com/stylesheets/style.css")
+ assert_dom_equal(
+ %(<link href="http://bar.example.com/stylesheets/style.css" media="screen" rel="Stylesheet" type="text/css" />),
+ result)
+ ensure
+ ActionController::Base.asset_host = ""
+ end
+
end