aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/request_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-09-20 06:44:53 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-09-20 06:44:53 +0000
commit47292cdef7fe9ca21c749c7fe594457ee1c81de6 (patch)
tree97a2a935484c75f3cb92e6244f8dd68925e0ef3f /actionpack/test/controller/request_test.rb
parent3e2bac428dab23f7455893b62d78be9817906d25 (diff)
downloadrails-47292cdef7fe9ca21c749c7fe594457ee1c81de6.tar.gz
rails-47292cdef7fe9ca21c749c7fe594457ee1c81de6.tar.bz2
rails-47292cdef7fe9ca21c749c7fe594457ee1c81de6.zip
Fixed that Request#domain caused an exception if the domain header wasn't set in the original http request #1795 [Michael Koziarski]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/request_test.rb')
-rw-r--r--actionpack/test/controller/request_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb
index 2aeff279be..49ce7b80bb 100644
--- a/actionpack/test/controller/request_test.rb
+++ b/actionpack/test/controller/request_test.rb
@@ -47,6 +47,9 @@ class RequestTest < Test::Unit::TestCase
@request.host = "192.168.1.200"
assert_nil @request.domain
+
+ @request.host = nil
+ assert_nil @request.domain
end
def test_subdomains
@@ -61,6 +64,9 @@ class RequestTest < Test::Unit::TestCase
@request.host = "foobar.foobar.com"
assert_equal %w( foobar ), @request.subdomains
+
+ @request.host = nil
+ assert_equal [], @request.subdomains
end
def test_port_string