diff options
author | Kamil Sobieraj <ksobej@gmail.com> | 2011-10-04 09:16:34 +0100 |
---|---|---|
committer | Kamil Sobieraj <ksobej@gmail.com> | 2011-10-04 09:16:34 +0100 |
commit | de942e5534a26942e261a7699adc28597c5ad1bc (patch) | |
tree | c326ef6b47d71a763d7a635c5496dd99739af1c1 /actionpack/test/dispatch | |
parent | 1eac9119620e9b537c1eca9619d4fa3ecb546149 (diff) | |
download | rails-de942e5534a26942e261a7699adc28597c5ad1bc.tar.gz rails-de942e5534a26942e261a7699adc28597c5ad1bc.tar.bz2 rails-de942e5534a26942e261a7699adc28597c5ad1bc.zip |
:subdomain can now be specified with a value of false in url_for, allowing for subdomain(s) removal from the host during link generation. Closes #2025
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index 060bcfb5ec..a611252b31 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -15,6 +15,7 @@ class RequestTest < ActiveSupport::TestCase assert_equal 'http://www.example.com', url_for assert_equal 'http://api.example.com', url_for(:subdomain => 'api') + assert_equal 'http://example.com', url_for(:subdomain => false) assert_equal 'http://www.ror.com', url_for(:domain => 'ror.com') assert_equal 'http://api.ror.co.uk', url_for(:host => 'www.ror.co.uk', :subdomain => 'api', :tld_length => 2) assert_equal 'http://www.example.com:8080', url_for(:port => 8080) |