aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2013-01-21 22:49:30 +0900
committerAkira Matsuda <ronnie@dio.jp>2013-01-22 05:24:23 +0900
commitd1c02a7fc2a12de63a3b106358015d457957f49f (patch)
treea0b61c9d710369a32f4589b4f9506a310bb250e4 /actionpack
parent1d7221c5087581a3752e4dab67ca2d27e93d4a1f (diff)
downloadrails-d1c02a7fc2a12de63a3b106358015d457957f49f.tar.gz
rails-d1c02a7fc2a12de63a3b106358015d457957f49f.tar.bz2
rails-d1c02a7fc2a12de63a3b106358015d457957f49f.zip
Make sure to reset default_url_options
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/integration_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index e2239c05c7..72b882539c 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -751,13 +751,17 @@ class UrlOptionsIntegrationTest < ActionDispatch::IntegrationTest
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