Permalink
Browse files

Make sure to reset default_url_options

  • Loading branch information...
1 parent 1d7221c commit d1c02a7fc2a12de63a3b106358015d457957f49f @amatsuda amatsuda committed Jan 21, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 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

0 comments on commit d1c02a7

Please sign in to comment.