mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
adding a test for #6459
This commit is contained in:
@@ -280,6 +280,16 @@ class LegacyRouteSetTests < Test::Unit::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_specific_controller_action_failure
|
||||
@rs.draw do
|
||||
mount lambda {} => "/foo"
|
||||
end
|
||||
|
||||
assert_raises(ActionController::RoutingError) do
|
||||
url_for(@rs, :controller => "omg", :action => "lol")
|
||||
end
|
||||
end
|
||||
|
||||
def test_default_setup
|
||||
@rs.draw { match '/:controller(/:action(/:id))' }
|
||||
assert_equal({:controller => "content", :action => 'index'}, rs.recognize_path("/content"))
|
||||
|
||||
Reference in New Issue
Block a user