Skip to content
Browse files

Add test for root

  • Loading branch information...
1 parent 1de9507 commit 8e48a5ef0ca488b2264acd2b38bdae14970c011f @dhh dhh committed Dec 21, 2009
Showing with 9 additions and 0 deletions.
  1. +9 −0 actionpack/test/dispatch/routing_test.rb
View
9 actionpack/test/dispatch/routing_test.rb
@@ -109,6 +109,8 @@ def self.matches?(request)
scope ':access_token', :constraints => { :access_token => /\w{5,5}/ } do
resources :rooms
end
+
+ root :to => 'projects#index'
end
end
@@ -458,6 +460,13 @@ def test_access_token_rooms
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

0 comments on commit 8e48a5e

Please sign in to comment.
Something went wrong with that request. Please try again.