mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
add failing test: "digested assets are removed from configured path"
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
committed by
José Valim
parent
db262211c9
commit
1f0b78e045
@@ -438,6 +438,19 @@ module ApplicationTests
|
||||
assert_equal 1, files.length, "Expected digested application.js asset to be generated, but none found"
|
||||
end
|
||||
|
||||
test "digested assets are removed from configured path" do
|
||||
app_file "public/production_assets/application.js", "alert();"
|
||||
add_to_env_config "production", "config.assets.prefix = 'production_assets'"
|
||||
|
||||
ENV["RAILS_ENV"] = nil
|
||||
quietly do
|
||||
Dir.chdir(app_path){ `bundle exec rake assets:clean` }
|
||||
end
|
||||
|
||||
files = Dir["#{app_path}/public/production_assets/application.js"]
|
||||
assert_equal 0, files.length, "Expected application.js asset to be removed, but still exists"
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def app_with_assets_in_view
|
||||
|
||||
Reference in New Issue
Block a user