diff options
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 374d2b6b33..b0d4e34345 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -221,20 +221,19 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end - # TODO: rackmount is broken - # def test_admin - # with_test_routes do - # get '/admin', {}, {'REMOTE_ADDR' => '192.168.1.100'} - # assert_equal 'queenbee#index', @response.body - # - # assert_raise(ActionController::RoutingError) { get '/admin', {}, {'REMOTE_ADDR' => '10.0.0.100'} } - # - # get '/admin/accounts', {}, {'REMOTE_ADDR' => '192.168.1.100'} - # assert_equal 'queenbee#accounts', @response.body - # - # assert_raise(ActionController::RoutingError) { get '/admin/accounts', {}, {'REMOTE_ADDR' => '10.0.0.100'} } - # end - # end + def test_admin + with_test_routes do + get '/admin', {}, {'REMOTE_ADDR' => '192.168.1.100'} + assert_equal 'queenbee#index', @response.body + + assert_raise(ActionController::RoutingError) { get '/admin', {}, {'REMOTE_ADDR' => '10.0.0.100'} } + + get '/admin/accounts', {}, {'REMOTE_ADDR' => '192.168.1.100'} + assert_equal 'queenbee#accounts', @response.body + + assert_raise(ActionController::RoutingError) { get '/admin/accounts', {}, {'REMOTE_ADDR' => '10.0.0.100'} } + end + end def test_global with_test_routes do |