aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/asset_tag_helper_test.rb
diff options
context:
space:
mode:
authorAlexey Vakhov <vakhov@gmail.com>2011-09-25 09:40:49 +0400
committerAlexey Vakhov <vakhov@gmail.com>2011-09-25 09:40:49 +0400
commit5ffa69793fd3e1d4af41ebc719a6736163eb7433 (patch)
treee3967559f06f138fb165f725ecf5032d173bf0ca /actionpack/test/template/asset_tag_helper_test.rb
parent6eaa9f0dadc9c4667d2040dd862b97bc92bdaf19 (diff)
downloadrails-5ffa69793fd3e1d4af41ebc719a6736163eb7433.tar.gz
rails-5ffa69793fd3e1d4af41ebc719a6736163eb7433.tar.bz2
rails-5ffa69793fd3e1d4af41ebc719a6736163eb7433.zip
escape options for the stylesheet_link_tag method
Diffstat (limited to 'actionpack/test/template/asset_tag_helper_test.rb')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index d93433deac..aa7304b3ed 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -366,6 +366,10 @@ class AssetTagHelperTest < ActionView::TestCase
assert stylesheet_link_tag('dir/other/file', 'dir/file2').html_safe?
end
+ def test_stylesheet_link_tag_escapes_options
+ assert_dom_equal %(<link href="/file.css" media="&lt;script&gt;" rel="stylesheet" type="text/css" />), stylesheet_link_tag('/file', :media => '<script>')
+ end
+
def test_custom_stylesheet_expansions
ENV["RAILS_ASSET_ID"] = ''
ActionView::Helpers::AssetTagHelper::register_stylesheet_expansion :robbery => ["bank", "robber"]