Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make sure to reset default_url_options

  • Loading branch information...
commit d1c02a7fc2a12de63a3b106358015d457957f49f 1 parent 1d7221c
@amatsuda amatsuda authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 actionpack/test/controller/integration_test.rb
View
6 actionpack/test/controller/integration_test.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.