aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/caching_test.rb8
-rw-r--r--actionpack/test/controller/request_test.rb6
2 files changed, 11 insertions, 3 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb
index f3cf66232f..828b2fbf26 100644
--- a/actionpack/test/controller/caching_test.rb
+++ b/actionpack/test/controller/caching_test.rb
@@ -248,16 +248,22 @@ class ActionCacheTest < Test::Unit::TestCase
@request.host = 'jamis.hostname.com'
get :index
jamis_cache = content_to_cache
-
+
+ reset!
+
@request.host = 'david.hostname.com'
get :index
david_cache = content_to_cache
assert_not_equal jamis_cache, @response.body
+ reset!
+
@request.host = 'jamis.hostname.com'
get :index
assert_equal jamis_cache, @response.body
+ reset!
+
@request.host = 'david.hostname.com'
get :index
assert_equal david_cache, @response.body
diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb
index 0fc8889db9..1ade378739 100644
--- a/actionpack/test/controller/request_test.rb
+++ b/actionpack/test/controller/request_test.rb
@@ -252,11 +252,13 @@ class RequestTest < Test::Unit::TestCase
end
- def test_host_with_port
+ def test_host_with_default_port
@request.host = "rubyonrails.org"
@request.port = 80
assert_equal "rubyonrails.org", @request.host_with_port
-
+ end
+
+ def test_host_with_non_default_port
@request.host = "rubyonrails.org"
@request.port = 81
assert_equal "rubyonrails.org:81", @request.host_with_port