提交 666897a0 编写于 作者: A Akira Matsuda

AC::Base#url_for is a public method

上级 d41939a6
......@@ -418,9 +418,9 @@ def test_named_routes_with_nil_keys
controller = kls.new
params = { action: :index, controller: :posts, format: :xml }
assert_equal("http://www.basecamphq.com/posts.xml", controller.send(:url_for, params))
assert_equal("http://www.basecamphq.com/posts.xml", controller.url_for(params))
params[:format] = nil
assert_equal("http://www.basecamphq.com/", controller.send(:url_for, params))
assert_equal("http://www.basecamphq.com/", controller.url_for(params))
end
end
......@@ -472,7 +472,7 @@ def test_url_generation_with_array_and_hash
controller = kls.new
assert_equal("http://www.basecamphq.com/admin/posts/new?param=value",
controller.send(:url_for, [:new, :admin, :post, { param: "value" }])
controller.url_for([:new, :admin, :post, { param: "value" }])
)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册