提交 7487e79d 编写于 作者: F Francesco Rodriguez

Add tests for #9441

上级 b1dee8c2
......@@ -456,6 +456,22 @@ def test_named_route_root_without_hash
assert_equal("/", routes.send(:root_path))
end
def test_named_route_root_with_hash
rs.draw do
root "hello#index", as: :index
end
routes = setup_for_named_route
assert_equal("http://test.host/", routes.send(:index_url))
assert_equal("/", routes.send(:index_path))
end
def test_root_without_path_raises_argument_error
assert_raises ArgumentError do
rs.draw { root nil }
end
end
def test_named_route_root_with_trailing_slash
rs.draw do
root "hello#index"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册