Skip to content
Browse files

add failing test for #3198

  • Loading branch information...
1 parent 7e03ace commit 6759a88f6321a206a6ad213e193e5b86dee53f4a @mjtko committed Oct 3, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 railties/test/application/assets_test.rb
View
13 railties/test/application/assets_test.rb
@@ -425,6 +425,19 @@ class ::PostsController < ActionController::Base ; end
assert_equal 1, output.scan("enhancement").size
end
+ test "digested assets are not mistakenly removed" do
+ app_file "public/assets/application.js", "alert();"
+ add_to_config "config.assets.compile = true"
+ add_to_config "config.assets.digest = true"
+
+ quietly do
+ Dir.chdir(app_path){ `bundle exec rake assets:clean assets:precompile` }
+ end
+
+ files = Dir["#{app_path}/public/assets/application-*.js"]
+ assert_equal 1, files.length, "Expected digested application.js asset to be generated, but none found"
+ end
+
private
def app_with_assets_in_view

0 comments on commit 6759a88

Please sign in to comment.
Something went wrong with that request. Please try again.