1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove a javascript from test

This commit is contained in:
John Hawthorn 2019-10-09 21:10:38 -07:00
parent e63695535e
commit 8d037fd3dd

View file

@ -224,14 +224,13 @@ module ApplicationTests
app_file "app/assets/images/rails.png", "notactuallyapng"
remove_file "app/assets/stylesheets/application.css"
app_file "app/assets/stylesheets/application.css.erb", "<%= asset_path('rails.png') %>"
app_file "app/assets/javascripts/application.js", "alert();"
precompile!
manifest = Dir["#{app_path}/public/assets/.sprockets-manifest-*.json"].first
assets = ActiveSupport::JSON.decode(File.read(manifest))
assert_match(/application-([0-z]+)\.js/, assets["assets"]["application.js"])
assert_match(/application-([0-z]+)\.css/, assets["assets"]["application.css"])
assert_match(/rails-([0-z]+)\.png/, assets["assets"]["rails.png"])
end
test "the manifest file should be saved by default in the same assets folder" do