diff options
author | Joshua Peek <josh@joshpeek.com> | 2012-10-13 09:59:57 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2012-10-13 09:59:57 -0500 |
commit | 5dfeb1b852c6c4a7b9c4aa3fa8dc5f25b516f9f1 (patch) | |
tree | 25513a30bbd4201878f8fa98fe90a5ed76c34dc7 /actionpack | |
parent | aa493f04d35c2aa3207db0ee6f5568b09ea764a9 (diff) | |
download | rails-5dfeb1b852c6c4a7b9c4aa3fa8dc5f25b516f9f1.tar.gz rails-5dfeb1b852c6c4a7b9c4aa3fa8dc5f25b516f9f1.tar.bz2 rails-5dfeb1b852c6c4a7b9c4aa3fa8dc5f25b516f9f1.zip |
Add a few more compute_asset_path tests
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/template/asset_tag_helper_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 43737b81e6..5dc854d561 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -295,6 +295,14 @@ class AssetTagHelperTest < ActionView::TestCase AssetPathToTag.each { |method, tag| assert_dom_equal(tag, eval(method)) } end + def test_compute_asset_public_path + assert_equal "/robots.txt", compute_asset_path("robots.txt") + assert_equal "/robots.txt", compute_asset_path("/robots.txt") + assert_equal "/javascripts/foo.js", compute_asset_path("foo.js", :type => :javascript) + assert_equal "/javascripts/foo.js", compute_asset_path("/foo.js", :type => :javascript) + assert_equal "/stylesheets/foo.css", compute_asset_path("foo.css", :type => :stylesheet) + end + def test_auto_discovery_link_tag AutoDiscoveryToTag.each { |method, tag| assert_dom_equal(tag, eval(method)) } end |