diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-08-11 17:59:18 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-08-28 10:51:04 +0200 |
commit | 7abc0c73bdaa004948f89336b0c4dfeb1f357269 (patch) | |
tree | da437fa89a02868d386e00ee7454f8d4141a103d /actionpack/test | |
parent | 9e731f0d8ac98055f510d1474ad652936074f204 (diff) | |
download | rails-7abc0c73bdaa004948f89336b0c4dfeb1f357269.tar.gz rails-7abc0c73bdaa004948f89336b0c4dfeb1f357269.tar.bz2 rails-7abc0c73bdaa004948f89336b0c4dfeb1f357269.zip |
Deprecate mime types lookup in auto_discovery_link_tag
Automatically handling mime types for things other than :rss and :atom
is not functionality that justifies dependency on Mime::Type from
actionpack.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/asset_tag_helper_test.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 6a44197525..25d85c47c7 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -65,7 +65,6 @@ class AssetTagHelperTest < ActionView::TestCase %(auto_discovery_link_tag) => %(<link href="http://www.example.com" rel="alternate" title="RSS" type="application/rss+xml" />), %(auto_discovery_link_tag(:rss)) => %(<link href="http://www.example.com" rel="alternate" title="RSS" type="application/rss+xml" />), %(auto_discovery_link_tag(:atom)) => %(<link href="http://www.example.com" rel="alternate" title="ATOM" type="application/atom+xml" />), - %(auto_discovery_link_tag(:xml)) => %(<link href="http://www.example.com" rel="alternate" title="XML" type="application/xml" />), %(auto_discovery_link_tag(:rss, :action => "feed")) => %(<link href="http://www.example.com" rel="alternate" title="RSS" type="application/rss+xml" />), %(auto_discovery_link_tag(:rss, "http://localhost/feed")) => %(<link href="http://localhost/feed" rel="alternate" title="RSS" type="application/rss+xml" />), %(auto_discovery_link_tag(:rss, "//localhost/feed")) => %(<link href="//localhost/feed" rel="alternate" title="RSS" type="application/rss+xml" />), @@ -299,6 +298,16 @@ class AssetTagHelperTest < ActionView::TestCase %(audio_tag(["audio.mp3", "audio.ogg"], :autobuffer => true, :controls => true)) => %(<audio autobuffer="autobuffer" controls="controls"><source src="/audios/audio.mp3" /><source src="/audios/audio.ogg" /></audio>) } + def test_autodiscovery_link_tag_deprecated_types + result = nil + assert_deprecated do + result = auto_discovery_link_tag(:xml) + end + + expected = %(<link href="http://www.example.com" rel="alternate" title="XML" type="application/xml" />) + assert_equal expected, result + end + def test_auto_discovery_link_tag AutoDiscoveryToTag.each { |method, tag| assert_dom_equal(tag, eval(method)) } end |