aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/asset_tag_helper_test.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-10-08 15:05:18 -0300
committerEmilio Tagua <miloops@gmail.com>2009-10-08 15:05:18 -0300
commit0cf4662ec589813c4fdc22de3398730cab05c5ed (patch)
treed422b8d8e4ccccf9bd89443b82398e1d7313269f /actionpack/test/template/asset_tag_helper_test.rb
parentc3f9d51a00b9e7e5f5d14e7464fae04c48198756 (diff)
parent665c7ad29d5614b8f5535d317f1dd2803ddcaa7d (diff)
downloadrails-0cf4662ec589813c4fdc22de3398730cab05c5ed.tar.gz
rails-0cf4662ec589813c4fdc22de3398730cab05c5ed.tar.bz2
rails-0cf4662ec589813c4fdc22de3398730cab05c5ed.zip
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test/template/asset_tag_helper_test.rb')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index 83fc6a282c..d94135b04b 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -231,6 +231,11 @@ class AssetTagHelperTest < ActionView::TestCase
assert_dom_equal(%(<script src="/javascripts/prototype.js?1" type="text/javascript"></script>\n<script src="/javascripts/effects.js?1" type="text/javascript"></script>\n<script src="/javascripts/dragdrop.js?1" type="text/javascript"></script>\n<script src="/javascripts/controls.js?1" type="text/javascript"></script>\n<script src="/javascripts/application.js?1" type="text/javascript"></script>), javascript_include_tag(:defaults))
end
+ def test_javascript_include_tag_is_html_safe
+ assert javascript_include_tag(:defaults).html_safe?
+ assert javascript_include_tag("prototype").html_safe?
+ end
+
def test_register_javascript_include_default
ENV["RAILS_ASSET_ID"] = ""
ActionView::Helpers::AssetTagHelper::register_javascript_include_default 'bank'
@@ -285,6 +290,13 @@ class AssetTagHelperTest < ActionView::TestCase
}
end
+ def test_stylesheet_link_tag_is_html_safe
+ ENV["RAILS_ASSET_ID"] = ""
+ assert stylesheet_link_tag('dir/file').html_safe?
+ assert stylesheet_link_tag('dir/other/file', 'dir/file2').html_safe?
+ assert stylesheet_tag('dir/file', {}).html_safe?
+ end
+
def test_custom_stylesheet_expansions
ENV["RAILS_ASSET_ID"] = ''
ActionView::Helpers::AssetTagHelper::register_stylesheet_expansion :robbery => ["bank", "robber"]