mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add test for root
This commit is contained in:
parent
1de95077dc
commit
8e48a5ef0c
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue