diff options
author | Joshua Peek <josh@joshpeek.com> | 2010-01-13 16:42:47 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2010-01-13 16:42:47 -0600 |
commit | 5d787590f25a592b85032f951fa5a3441b89eb1b (patch) | |
tree | d83a974ed07c3f7e1013b235c3bd96bcf980c274 | |
parent | bf9b81e2cbfd4333f0b813ac07ea9d9c982e7779 (diff) | |
download | rails-5d787590f25a592b85032f951fa5a3441b89eb1b.tar.gz rails-5d787590f25a592b85032f951fa5a3441b89eb1b.tar.bz2 rails-5d787590f25a592b85032f951fa5a3441b89eb1b.zip |
Cool this routing test passes now
-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 |