aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/asset_tag_helper_test.rb
diff options
context:
space:
mode:
authorkennyj <kennyj@gmail.com>2013-06-02 00:39:11 +0900
committerkennyj <kennyj@gmail.com>2013-06-02 00:39:11 +0900
commitbc5314a10231983c46ab81488935b259cdf36a04 (patch)
tree498556fc54e2f5840809e002859f51ca92376630 /actionpack/test/template/asset_tag_helper_test.rb
parent74f2b41ce06492da307c7f00b011a8c5106e1151 (diff)
downloadrails-bc5314a10231983c46ab81488935b259cdf36a04.tar.gz
rails-bc5314a10231983c46ab81488935b259cdf36a04.tar.bz2
rails-bc5314a10231983c46ab81488935b259cdf36a04.zip
Raise ArgumentError to fix Rails 4.1 deprecation warn message.
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, 7 insertions, 5 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index 67f593c22f..8d0ab7fd81 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -298,13 +298,15 @@ class AssetTagHelperTest < ActionView::TestCase
%(font_path("font.ttf?123")) => %(/fonts/font.ttf?123)
}
- def test_autodiscovery_link_tag_deprecated_types
- result = nil
- assert_deprecated do
- result = auto_discovery_link_tag(:xml)
+ def test_autodiscovery_link_tag_with_unknown_type_but_not_pass_type_option_key
+ assert_raise(ArgumentError) do
+ auto_discovery_link_tag(:xml)
end
+ end
- expected = %(<link href="http://www.example.com" rel="alternate" title="XML" type="application/xml" />)
+ def test_autodiscovery_link_tag_with_unknown_type
+ result = auto_discovery_link_tag(:xml, '/feed.xml', :type => 'application/xml')
+ expected = %(<link href="/feed.xml" rel="alternate" title="XML" type="application/xml" />)
assert_equal expected, result
end