提交 d1c02a7f 编写于 作者: A Akira Matsuda

Make sure to reset default_url_options

上级 1d7221c5
......@@ -751,13 +751,17 @@ def app
assert_equal "http://bar.com/foo", foos_url
end
test "test can override default url options" do
def test_can_override_default_url_options
original_host = default_url_options.dup
default_url_options[:host] = "foobar.com"
assert_equal "http://foobar.com/foo", foos_url
get "/bar"
assert_response :success
assert_equal "http://foobar.com/foo", foos_url
ensure
ActionDispatch::Integration::Session.default_url_options = self.default_url_options = original_host
end
test "current request path parameters are recalled" do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册