aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/url_for_test.rb
diff options
context:
space:
mode:
authorDmitry Polushkin <dmitry.polushkin@gmail.com>2011-10-05 17:35:59 +0100
committerDmitry Polushkin <dmitry.polushkin@gmail.com>2011-10-05 17:35:59 +0100
commit84eece0a823e9c601ea99a8709f24605a19bcbfd (patch)
tree12ac66c6404f35faddd06617987ad6db76b11406 /actionpack/test/controller/url_for_test.rb
parent19965402b2f868c79d78269ca17cb6282f271382 (diff)
parentc495bfc127405f7ead0d1c275c4d75682a51e00e (diff)
downloadrails-84eece0a823e9c601ea99a8709f24605a19bcbfd.tar.gz
rails-84eece0a823e9c601ea99a8709f24605a19bcbfd.tar.bz2
rails-84eece0a823e9c601ea99a8709f24605a19bcbfd.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'actionpack/test/controller/url_for_test.rb')
-rw-r--r--actionpack/test/controller/url_for_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/controller/url_for_test.rb b/actionpack/test/controller/url_for_test.rb
index 484e996f31..11ced2df2a 100644
--- a/actionpack/test/controller/url_for_test.rb
+++ b/actionpack/test/controller/url_for_test.rb
@@ -67,6 +67,20 @@ module AbstractController
)
end
+ def test_subdomain_may_be_removed
+ add_host!
+ assert_equal('http://basecamphq.com/c/a/i',
+ W.new.url_for(:subdomain => false, :controller => 'c', :action => 'a', :id => 'i')
+ )
+ end
+
+ def test_multiple_subdomains_may_be_removed
+ W.default_url_options[:host] = 'mobile.www.api.basecamphq.com'
+ assert_equal('http://basecamphq.com/c/a/i',
+ W.new.url_for(:subdomain => false, :controller => 'c', :action => 'a', :id => 'i')
+ )
+ end
+
def test_domain_may_be_changed
add_host!
assert_equal('http://www.37signals.com/c/a/i',