Skip to content

Commit

Permalink
Test + character in asset name
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed May 10, 2015
1 parent 7743421 commit 992f258
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/fixtures/default/+plus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
function plus(a, b) { return a + b; }
6 changes: 6 additions & 0 deletions test/test_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,12 @@ def self.test(name, &block)
assert_equal [137, 80, 78, 71, 13, 10, 26, 10, 60, 115], asset.to_s[0, 10].bytes.to_a
end

test "asset with + character" do
assert asset = @env.find_asset("+plus.js")
assert_equal "+plus.js", asset.logical_path
assert_equal "application/javascript", asset.content_type
end

test "missing static path returns nil" do
assert_nil @env[fixture_path("default/missing.png")]
end
Expand Down

0 comments on commit 992f258

Please sign in to comment.