aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/asset_tag_helper_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-02-21 15:28:37 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-02-21 15:28:37 +0000
commit7f55931f80162937b344eb200ca62f2d58c6c59d (patch)
treecfec756316241a560a657721a4ffe04a8c050241 /actionpack/test/template/asset_tag_helper_test.rb
parentde0a0d700e8c3959a3503152b9a495616afbeae5 (diff)
downloadrails-7f55931f80162937b344eb200ca62f2d58c6c59d.tar.gz
rails-7f55931f80162937b344eb200ca62f2d58c6c59d.tar.bz2
rails-7f55931f80162937b344eb200ca62f2d58c6c59d.zip
Make sure that the filesystem is not involved with asset hosting
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6187 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.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index 8b8a426bf6..47a27e6e5d 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -42,6 +42,7 @@ class AssetTagHelperTest < Test::Unit::TestCase
def teardown
ActionController::Base.perform_caching = false
+ ActionController::Base.asset_host = nil
ENV["RAILS_ASSET_ID"] = nil
end
@@ -194,17 +195,18 @@ class AssetTagHelperTest < Test::Unit::TestCase
def test_caching_javascript_include_tag_when_caching_on
ENV["RAILS_ASSET_ID"] = ""
+ ActionController::Base.asset_host = 'http://a%d.example.com'
ActionController::Base.perform_caching = true
assert_dom_equal(
- %(<script src="/javascripts/all.js" type="text/javascript"></script>),
+ %(<script src="http://a0.example.com/javascripts/all.js" type="text/javascript"></script>),
javascript_include_tag(:all, :cache => true)
)
assert File.exists?(File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'all.js'))
assert_dom_equal(
- %(<script src="/javascripts/money.js" type="text/javascript"></script>),
+ %(<script src="http://a2.example.com/javascripts/money.js" type="text/javascript"></script>),
javascript_include_tag(:all, :cache => "money")
)
@@ -235,17 +237,18 @@ class AssetTagHelperTest < Test::Unit::TestCase
def test_caching_stylesheet_link_tag_when_caching_on
ENV["RAILS_ASSET_ID"] = ""
+ ActionController::Base.asset_host = 'http://a%d.example.com'
ActionController::Base.perform_caching = true
assert_dom_equal(
- %(<link href="/stylesheets/all.css" media="screen" rel="Stylesheet" type="text/css" />),
+ %(<link href="http://a3.example.com/stylesheets/all.css" media="screen" rel="Stylesheet" type="text/css" />),
stylesheet_link_tag(:all, :cache => true)
)
assert File.exists?(File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR, 'all.css'))
assert_dom_equal(
- %(<link href="/stylesheets/money.css" media="screen" rel="Stylesheet" type="text/css" />),
+ %(<link href="http://a3.example.com/stylesheets/money.css" media="screen" rel="Stylesheet" type="text/css" />),
stylesheet_link_tag(:all, :cache => "money")
)