diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2010-11-16 18:49:08 +0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-16 18:57:51 +0800 |
commit | e1e780a31d56f3bf22f13afd92b7e1274bd4b531 (patch) | |
tree | ac3f333348a21e151f086659718357f56b88412e /actionpack/test | |
parent | ecd0310e1422170c4fea6dccf60a42273bce779e (diff) | |
download | rails-e1e780a31d56f3bf22f13afd92b7e1274bd4b531.tar.gz rails-e1e780a31d56f3bf22f13afd92b7e1274bd4b531.tar.bz2 rails-e1e780a31d56f3bf22f13afd92b7e1274bd4b531.zip |
Brought the domain method in AD http url inline with subdomain where @@tld_length is used by default. Also set the default value of @@tld_length to 1.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 04709e5346..4764a8c2a8 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -96,6 +96,9 @@ class RequestTest < ActiveSupport::TestCase request = stub_request 'HTTP_HOST' => "www.rubyonrails.co.uk" assert_equal "rubyonrails.co.uk", request.domain(2) + request = stub_request 'HTTP_HOST' => "www.rubyonrails.co.uk", :tld_length => 2 + assert_equal "rubyonrails.co.uk", request.domain + request = stub_request 'HTTP_HOST' => "192.168.1.200" assert_nil request.domain |