aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2011-12-14 07:07:05 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2011-12-14 07:07:05 -0800
commit384a60a16c7b881ed22d29c0babcdd2cb84f0790 (patch)
tree91805d11619f59b574c80ad5497d5c035a26ed00 /actionpack/test
parentbb44e5a80ac62f87a40122a213038a746f2bc289 (diff)
parent5f67cfeda116f2b932ef72781420aa37e62437ca (diff)
downloadrails-384a60a16c7b881ed22d29c0babcdd2cb84f0790.tar.gz
rails-384a60a16c7b881ed22d29c0babcdd2cb84f0790.tar.bz2
rails-384a60a16c7b881ed22d29c0babcdd2cb84f0790.zip
Merge pull request #3981 from choonkeat/master
Fix url_for options[:subdomain] to allow objects as values
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/url_for_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/url_for_test.rb b/actionpack/test/controller/url_for_test.rb
index dc07e07cb9..288efbf7c3 100644
--- a/actionpack/test/controller/url_for_test.rb
+++ b/actionpack/test/controller/url_for_test.rb
@@ -71,6 +71,14 @@ module AbstractController
)
end
+ def test_subdomain_may_be_object
+ model = mock(:to_param => 'api')
+ add_host!
+ assert_equal('http://api.basecamphq.com/c/a/i',
+ W.new.url_for(:subdomain => model, :controller => 'c', :action => 'a', :id => 'i')
+ )
+ end
+
def test_subdomain_may_be_removed
add_host!
assert_equal('http://basecamphq.com/c/a/i',