未验证 提交 606cd4f8 编写于 作者: J John Hawthorn 提交者: Rafael Mendonça França

Sprockets uses debug. not self. now

上级 f3993f9d
......@@ -54,7 +54,7 @@ class ::PostsController < ActionController::Base ; end
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 @@ class ::PostsController < ActionController::Base ; end
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
......
......@@ -489,9 +489,9 @@ class ::PostsController < ActionController::Base ; end
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册