Permalink
Browse files

Add a few more compute_asset_path tests

  • Loading branch information...
1 parent aa493f0 commit 5dfeb1b852c6c4a7b9c4aa3fa8dc5f25b516f9f1 @josh josh committed Oct 13, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 actionpack/test/template/asset_tag_helper_test.rb
View
8 actionpack/test/template/asset_tag_helper_test.rb
@@ -295,6 +295,14 @@ def test_asset_path_tag
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

0 comments on commit 5dfeb1b

Please sign in to comment.