提交 c544fcc8 编写于 作者: R rohit 提交者: Santiago Pastorino

Failing test to check for route file corruption if legacy map parameter is used. [#5263 state:open]

上级 3b44b52f
......@@ -216,4 +216,19 @@ def test_scaffold_with_namespace_on_revoke
# Stylesheets (should not be removed)
assert_file "public/stylesheets/scaffold.css"
end
def test_scaffold_generator_on_revoke_does_not_mutilate_legacy_map_parameter
run_generator
# Add a |map| parameter to the routes block manually
route_path = File.expand_path("config/routes.rb", destination_root)
content = File.read(route_path).gsub(/\.routes\.draw do/) do |match|
"#{match} |map|"
end
File.open(route_path, "wb") { |file| file.write(content) }
run_generator ["product_line"], :behavior => :revoke
assert_file "config/routes.rb", /\.routes\.draw do\s*\|map\|\s*$/
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册