aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2009-12-21 21:49:36 -0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2009-12-21 21:49:36 -0800
commit8e48a5ef0ca488b2264acd2b38bdae14970c011f (patch)
tree8d925e361688cf09ab6e3fe8df6b9609a69ffa83
parent1de95077dc3bfc7589ca85dc31d46a1ea6db7650 (diff)
downloadrails-8e48a5ef0ca488b2264acd2b38bdae14970c011f.tar.gz
rails-8e48a5ef0ca488b2264acd2b38bdae14970c011f.tar.bz2
rails-8e48a5ef0ca488b2264acd2b38bdae14970c011f.zip
Add test for root
-rw-r--r--actionpack/test/dispatch/routing_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 7058bc2ea0..1c7822358d 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -109,6 +109,8 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
scope ':access_token', :constraints => { :access_token => /\w{5,5}/ } do
resources :rooms
end
+
+ root :to => 'projects#index'
end
end
@@ -458,6 +460,13 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
end
end
+ def test_root
+ with_test_routes do
+ get '/'
+ assert_equal 'projects#index', @response.body
+ end
+ end
+
private
def with_test_routes
real_routes, temp_routes = ActionController::Routing::Routes, Routes