aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-06-16 09:09:38 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-06-16 09:09:38 -0700
commitbebfa5c62b6795997bf0ee8830d64e665bc1245b (patch)
treeffa4b78fdfeb3aef1d28c1c5179dafd866286c66 /actionpack/test/template
parent27846d89ffbd73071e8541f8b251fa4b6d279203 (diff)
parentafb053b4d388137830320ed8dd49a40dc29a962c (diff)
downloadrails-bebfa5c62b6795997bf0ee8830d64e665bc1245b.tar.gz
rails-bebfa5c62b6795997bf0ee8830d64e665bc1245b.tar.bz2
rails-bebfa5c62b6795997bf0ee8830d64e665bc1245b.zip
Merge pull request #6752 from steveklabnik/fix_5680
Respect absolute paths in compute_source_path.
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index 7cc567c72d..bcc55189b9 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -1267,9 +1267,6 @@ class AssetTagHelperTest < ActionView::TestCase
assert !File.exist?(File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR, 'money.css'))
end
-
-
-
def test_caching_stylesheet_include_tag_when_caching_off
ENV["RAILS_ASSET_ID"] = ""
config.perform_caching = false
@@ -1298,6 +1295,17 @@ class AssetTagHelperTest < ActionView::TestCase
assert !File.exist?(File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR, 'money.css'))
end
+
+ def test_caching_stylesheet_include_tag_with_absolute_uri
+ ENV["RAILS_ASSET_ID"] = ""
+
+ assert_dom_equal(
+ %(<link href="/stylesheets/all.css" media="screen" rel="stylesheet" />),
+ stylesheet_link_tag("/foo/baz", :cache => true)
+ )
+
+ FileUtils.rm(File.join(ActionView::Helpers::AssetTagHelper::STYLESHEETS_DIR, 'all.css'))
+ end
end
class AssetTagHelperNonVhostTest < ActionView::TestCase