| | 218 | end |
|---|
| | 219 | |
|---|
| | 220 | def test_caching_javascript_include_tag_when_caching_on_and_using_subdirectory |
|---|
| | 221 | ENV["RAILS_ASSET_ID"] = "" |
|---|
| | 222 | ActionController::Base.asset_host = 'http://a%d.example.com' |
|---|
| | 223 | ActionController::Base.perform_caching = true |
|---|
| | 224 | |
|---|
| | 225 | assert_dom_equal( |
|---|
| | 226 | %(<script src="http://a3.example.com/javascripts/cache/money.js" type="text/javascript"></script>), |
|---|
| | 227 | javascript_include_tag(:all, :cache => "cache/money") |
|---|
| | 228 | ) |
|---|
| | 229 | |
|---|
| | 230 | assert File.exists?(File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'cache', 'money.js')) |
|---|
| | 231 | ensure |
|---|
| | 232 | File.delete(File.join(ActionView::Helpers::AssetTagHelper::JAVASCRIPTS_DIR, 'cache', 'money.js')) |
|---|