diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2010-11-03 10:52:50 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-11 17:27:47 +0100 |
commit | 793967cd404c839c1af8b3ef847dc1725a1fb7c6 (patch) | |
tree | 3f7997585d63a442f498f9f34c62385858a32471 /actionpack/test | |
parent | 154e5d735efcc840c3be52a19b1f8a89eeb2e9e9 (diff) | |
download | rails-793967cd404c839c1af8b3ef847dc1725a1fb7c6.tar.gz rails-793967cd404c839c1af8b3ef847dc1725a1fb7c6.tar.bz2 rails-793967cd404c839c1af8b3ef847dc1725a1fb7c6.zip |
provide better error message if path is uri [#5914 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/asset_tag_helper_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 3abcdfbc1e..caf1c694c8 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -727,6 +727,17 @@ class AssetTagHelperTest < ActionView::TestCase assert !File.exist?(File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'money.js')) end + def test_caching_javascript_include_tag_when_caching_on_and_javascript_file_is_uri + ENV["RAILS_ASSET_ID"] = "" + config.perform_caching = true + + assert_raise(Errno::ENOENT) { + javascript_include_tag('bank', 'robber', 'https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.js', :cache => true) + } + + assert !File.exist?(File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'all.js')) + end + def test_caching_javascript_include_tag_when_caching_off_and_missing_javascript_file ENV["RAILS_ASSET_ID"] = "" config.perform_caching = false |