diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-12-16 16:57:11 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-12-16 16:57:11 -0200 |
commit | b1c19eb05299fbae2a80beb4abacacc4b5340776 (patch) | |
tree | 2bceb8727e6866ec8d6bb5ecf919a9440c2c820f /railties/test | |
parent | 27710b1edaca452e2b5c0afb21af3d4e64d0b41c (diff) | |
parent | 877a411d0c16baa4e670dae9a28f5cfcc201adc1 (diff) | |
download | rails-b1c19eb05299fbae2a80beb4abacacc4b5340776.tar.gz rails-b1c19eb05299fbae2a80beb4abacacc4b5340776.tar.bz2 rails-b1c19eb05299fbae2a80beb4abacacc4b5340776.zip |
Merge branch 'sprockets-3'
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/asset_debugging_test.rb | 5 | ||||
-rw-r--r-- | railties/test/application/assets_test.rb | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/railties/test/application/asset_debugging_test.rb b/railties/test/application/asset_debugging_test.rb index 8b83784ed6..0659110ac0 100644 --- a/railties/test/application/asset_debugging_test.rb +++ b/railties/test/application/asset_debugging_test.rb @@ -58,7 +58,7 @@ module ApplicationTests assert_no_match(/<script src="\/assets\/xmlhr-([0-z]+)\.js"><\/script>/, last_response.body) end - test "assets are served with sourcemaps when compile is true and debug_assets params is true" do + test "assets aren't concatenated when compile is true is on and debug_assets params is true" do add_to_env_config "production", "config.assets.compile = true" # Load app env @@ -67,7 +67,8 @@ module ApplicationTests class ::PostsController < ActionController::Base ; end get '/posts?debug_assets=true' - assert_match(/<script src="\/assets\/application(\.debug)?-([0-z]+)\.js"><\/script>/, last_response.body) + assert_match(/<script src="\/assets\/application(\.self)?-([0-z]+)\.js\?body=1"><\/script>/, last_response.body) + assert_match(/<script src="\/assets\/xmlhr(\.self)?-([0-z]+)\.js\?body=1"><\/script>/, last_response.body) end end end diff --git a/railties/test/application/assets_test.rb b/railties/test/application/assets_test.rb index 18882e1855..7e9a9a5f3b 100644 --- a/railties/test/application/assets_test.rb +++ b/railties/test/application/assets_test.rb @@ -174,7 +174,7 @@ module ApplicationTests precompile! - assert_file_exists("#{app_path}/public/assets/something-*.js") + assert_file_exists("#{app_path}/public/assets/something/index-*.js") end test 'precompile use assets defined in app env config' do @@ -410,7 +410,7 @@ module ApplicationTests precompile! - assert_equal "Post\n;\n", File.read(Dir["#{app_path}/public/assets/application-*.js"].first) + assert_equal "Post;\n", File.read(Dir["#{app_path}/public/assets/application-*.js"].first) end test "initialization on the assets group should set assets_dir" do @@ -458,9 +458,9 @@ module ApplicationTests class ::PostsController < ActionController::Base; end get '/posts', {}, {'HTTPS'=>'off'} - assert_match('src="http://example.com/assets/application.debug.js', last_response.body) + assert_match('src="http://example.com/assets/application.self.js', last_response.body) get '/posts', {}, {'HTTPS'=>'on'} - assert_match('src="https://example.com/assets/application.debug.js', last_response.body) + assert_match('src="https://example.com/assets/application.self.js', last_response.body) end test "asset urls should be protocol-relative if no request is in scope" do |