diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-09 22:41:45 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-09 22:41:45 +0000 |
commit | c6c3fc42d8fb971692d5c15406bde299345f879b (patch) | |
tree | a1f1923f5c9036e7180f74ae5fb19603ab89febd /actionpack/test | |
parent | 44a178754eed0398e37521b6fa070b78c8d0be27 (diff) | |
download | rails-c6c3fc42d8fb971692d5c15406bde299345f879b.tar.gz rails-c6c3fc42d8fb971692d5c15406bde299345f879b.tar.bz2 rails-c6c3fc42d8fb971692d5c15406bde299345f879b.zip |
Removed the deprecated behavior of appending ".png" to image_tag/image_path calls without an existing extension [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7432 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/asset_tag_helper_test.rb | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 65b0d368d8..09bae17aa4 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -98,8 +98,9 @@ class AssetTagHelperTest < Test::Unit::TestCase } ImagePathToTag = { - %(image_path("xml.png")) => %(/images/xml.png), - %(image_path("dir/xml.png")) => %(/images/dir/xml.png), + %(image_path("xml")) => %(/images/xml), + %(image_path("xml.png")) => %(/images/xml.png), + %(image_path("dir/xml.png")) => %(/images/dir/xml.png), %(image_path("/dir/xml.png")) => %(/dir/xml.png) } @@ -114,10 +115,6 @@ class AssetTagHelperTest < Test::Unit::TestCase %(image_tag("http://www.rubyonrails.com/images/rails.png")) => %(<img alt="Rails" src="http://www.rubyonrails.com/images/rails.png" />) } - DeprecatedImagePathToTag = { - %(image_path("xml")) => %(/images/xml.png) - } - def test_auto_discovery_link_tag AutoDiscoveryToTag.each { |method, tag| assert_dom_equal(tag, eval(method)) } @@ -160,12 +157,6 @@ class AssetTagHelperTest < Test::Unit::TestCase ImageLinkToTag.each { |method, tag| assert_dom_equal(tag, eval(method)) } end - def test_should_deprecate_image_filename_with_no_extension - DeprecatedImagePathToTag.each do |method, tag| - assert_deprecated("image_path") { assert_dom_equal(tag, eval(method)) } - end - end - def test_timebased_asset_id expected_time = File.stat(File.expand_path(File.dirname(__FILE__) + "/../fixtures/public/images/rails.png")).mtime.to_i.to_s assert_equal %(<img alt="Rails" src="/images/rails.png?#{expected_time}" />), image_tag("rails.png") |