aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/asset_tag_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/asset_tag_helper_test.rb')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb24
1 files changed, 3 insertions, 21 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index 1bf748af14..a1a6b5f1d0 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -303,17 +303,8 @@ class AssetTagHelperTest < ActionView::TestCase
end
def test_custom_javascript_expansions_with_undefined_symbol
- assert_raise(ArgumentError) { javascript_include_tag('first', :unknown, 'last') }
- end
-
- def test_custom_javascript_expansions_with_nil_value
ActionView::Helpers::AssetTagHelper::register_javascript_expansion :monkey => nil
- assert_dom_equal %(<script src="/javascripts/first.js" type="text/javascript"></script>\n<script src="/javascripts/last.js" type="text/javascript"></script>), javascript_include_tag('first', :monkey, 'last')
- end
-
- def test_custom_javascript_expansions_with_empty_array_value
- ActionView::Helpers::AssetTagHelper::register_javascript_expansion :monkey => []
- assert_dom_equal %(<script src="/javascripts/first.js" type="text/javascript"></script>\n<script src="/javascripts/last.js" type="text/javascript"></script>), javascript_include_tag('first', :monkey, 'last')
+ assert_raise(ArgumentError) { javascript_include_tag('first', :monkey, 'last') }
end
def test_custom_javascript_and_stylesheet_expansion_with_same_name
@@ -388,18 +379,9 @@ class AssetTagHelperTest < ActionView::TestCase
assert_dom_equal %(<link href="/stylesheets/london.css" media="screen" rel="stylesheet" type="text/css" />\n<link href="/stylesheets/wellington.css" media="screen" rel="stylesheet" type="text/css" />\n<link href="/stylesheets/amsterdam.css" media="screen" rel="stylesheet" type="text/css" />), stylesheet_link_tag('london', :cities)
end
- def test_custom_stylesheet_expansions_with_unknown_symbol
- assert_raise(ArgumentError) { stylesheet_link_tag('first', :unknown, 'last') }
- end
-
- def test_custom_stylesheet_expansions_with_nil_value
+ def test_custom_stylesheet_expansions_with_undefined_symbol
ActionView::Helpers::AssetTagHelper::register_stylesheet_expansion :monkey => nil
- assert_dom_equal %(<link href="/stylesheets/first.css" rel="stylesheet" type="text/css" media="screen" />\n<link href="/stylesheets/last.css" rel="stylesheet" type="text/css" media="screen" />), stylesheet_link_tag('first', :monkey, 'last')
- end
-
- def test_custom_stylesheet_expansions_with_empty_array_value
- ActionView::Helpers::AssetTagHelper::register_stylesheet_expansion :monkey => []
- assert_dom_equal %(<link href="/stylesheets/first.css" rel="stylesheet" type="text/css" media="screen" />\n<link href="/stylesheets/last.css" rel="stylesheet" type="text/css" media="screen" />), stylesheet_link_tag('first', :monkey, 'last')
+ assert_raise(ArgumentError) { stylesheet_link_tag('first', :monkey, 'last') }
end
def test_registering_stylesheet_expansions_merges_with_existing_expansions