diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-03-09 21:20:13 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-03-09 21:20:13 -0600 |
commit | 1cc2a61ea655fea246f4c3e22a9e4a494e99d952 (patch) | |
tree | b1743dd232046ab122471e1595960d65ac991cb2 /actionpack/test/dispatch/routing_test.rb | |
parent | 4d2470f7daad8cebd0a69f5ea0509a41af0596b8 (diff) | |
download | rails-1cc2a61ea655fea246f4c3e22a9e4a494e99d952.tar.gz rails-1cc2a61ea655fea246f4c3e22a9e4a494e99d952.tar.bz2 rails-1cc2a61ea655fea246f4c3e22a9e4a494e99d952.zip |
Allow default_url_options to be set on route set
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index b46276c453..f5fcf9b0df 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -15,6 +15,8 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest stub_controllers do |routes| Routes = routes Routes.draw do + default_url_options :host => "rubyonrails.org" + controller :sessions do get 'login' => :new, :as => :login post 'login' => :create @@ -189,6 +191,8 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest assert_equal '/login', url_for(:controller => 'sessions', :action => 'create', :only_path => true) assert_equal '/login', url_for(:controller => 'sessions', :action => 'new', :only_path => true) + + assert_equal 'http://rubyonrails.org/login', Routes.url_for(:controller => 'sessions', :action => 'create') end end |