Skip to content

Commit

Permalink
Add a few more compute_asset_path tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Oct 13, 2012
1 parent aa493f0 commit 5dfeb1b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions actionpack/test/template/asset_tag_helper_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 5dfeb1b

Please sign in to comment.