From 28e744d682f82c370646c688e99b72a3393e1e14 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 14 Jun 2012 10:55:30 -0700 Subject: [PATCH] adding a test for #6459 --- actionpack/test/controller/routing_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index a40a067698b9a..977f97aca9a70 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -207,6 +207,16 @@ def test_draw_with_block_arity_one_raises 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"))