0
@@ -137,6 +137,9 @@ class AssertResponseWithUnexpectedErrorController < ActionController::Base
0
+class UserController < ActionController::Base
0
class InnerModuleController < ActionController::Base
0
@@ -174,7 +177,7 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase
0
# let's get this party started
0
ActionController::Routing::Routes.reload
0
- ActionController::Routing.use_controllers!(%w(action_pack_assertions admin/inner_module
content admin/user))
0
+ ActionController::Routing.use_controllers!(%w(action_pack_assertions admin/inner_module
user content admin/user))
0
@controller = ActionPackAssertionsController.new
0
@request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new
0
@@ -268,7 +271,7 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase
0
assert_redirected_to admin_inner_module_path
0
def test_assert_redirected_to_top_level_named_route_from_nested_controller
0
@@ -277,11 +280,25 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase
0
@controller = Admin::InnerModuleController.new
0
process :redirect_to_top_level_named_route
0
- #
passes -> assert_redirected_to "http://test.host/action_pack_assertions/foo"0
+ #
assert_redirected_to "http://test.host/action_pack_assertions/foo" would pass because of exact match early return0
assert_redirected_to "/action_pack_assertions/foo"
0
+ def test_assert_redirected_to_top_level_named_route_with_same_controller_name_in_both_namespaces
0
+ # this controller exists in the admin namespace as well which is the only difference from previous test
0
+ map.top_level '/user/:id', :controller => 'user', :action => 'index'
0
+ map.connect ':controller/:action/:id'
0
+ @controller = Admin::InnerModuleController.new
0
+ process :redirect_to_top_level_named_route
0
+ # assert_redirected_to top_level_url('foo') would pass because of exact match early return
0
+ assert_redirected_to top_level_path('foo')
0
# -- standard request/response object testing --------------------------------
0
# make sure that the template objects exist