mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Add test for root
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user