mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Sprockets uses debug. not self. now
This commit is contained in:
parent
441917629e
commit
72b1ae6a5a
2 changed files with 4 additions and 5 deletions
|
@ -54,7 +54,7 @@ module ApplicationTests
|
|||
assert_no_match(/<script src="\/assets\/xmlhr-([0-z]+)\.js"><\/script>/, last_response.body)
|
||||
end
|
||||
|
||||
test "assets aren't concatenated when compile is true is on and debug_assets params is true" do
|
||||
test "assets are debug 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
|
||||
|
@ -63,8 +63,7 @@ module ApplicationTests
|
|||
class ::PostsController < ActionController::Base ; end
|
||||
|
||||
get "/posts?debug_assets=true"
|
||||
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)
|
||||
assert_match(/<script src="\/assets\/application(\.debug|\.self)?-([0-z]+)\.js(\?body=1)?"><\/script>/, last_response.body)
|
||||
end
|
||||
|
||||
test "public path and tag methods are not over-written by the asset pipeline" do
|
||||
|
|
|
@ -475,9 +475,9 @@ module ApplicationTests
|
|||
class ::PostsController < ActionController::Base; end
|
||||
|
||||
get "/posts", {}, { "HTTPS" => "off" }
|
||||
assert_match('src="http://example.com/assets/application.self.js', last_response.body)
|
||||
assert_match('src="http://example.com/assets/application.debug.js', last_response.body)
|
||||
get "/posts", {}, { "HTTPS" => "on" }
|
||||
assert_match('src="https://example.com/assets/application.self.js', last_response.body)
|
||||
assert_match('src="https://example.com/assets/application.debug.js', last_response.body)
|
||||
end
|
||||
|
||||
test "asset URLs should be protocol-relative if no request is in scope" do
|
||||
|
|
Loading…
Reference in a new issue