mirror of https://github.com/rails/rails
add failing test for #3198
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
177ccbf773
commit
a7648c213d
|
@ -425,6 +425,19 @@ module ApplicationTests
|
||||||
assert_equal 1, output.scan("enhancement").size
|
assert_equal 1, output.scan("enhancement").size
|
||||||
end
|
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
|
private
|
||||||
|
|
||||||
def app_with_assets_in_view
|
def app_with_assets_in_view
|
||||||
|
|
Loading…
Reference in New Issue