diff options
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 6 | ||||
-rw-r--r-- | actionpack/test/controller/url_rewriter_test.rb | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index cfba8fb976..18fcef5bc5 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -853,6 +853,12 @@ class RouteTest < Test::Unit::TestCase { :controller => "users", :action => "show", :format => "html" }, route.defaults) end + + def test_builder_complains_without_controller + assert_raises(ArgumentError) do + ROUTING::RouteBuilder.new.build '/contact', :contoller => "contact", :action => "index" + end + end def test_significant_keys_for_default_route keys = default_route.significant_keys.sort_by {|k| k.to_s } diff --git a/actionpack/test/controller/url_rewriter_test.rb b/actionpack/test/controller/url_rewriter_test.rb index 53cd278b6b..882add496f 100644 --- a/actionpack/test/controller/url_rewriter_test.rb +++ b/actionpack/test/controller/url_rewriter_test.rb @@ -78,7 +78,7 @@ class UrlWriterTests < Test::Unit::TestCase def test_named_route ActionController::Routing::Routes.draw do |map| - map.home '/home/sweet/home/:user' + map.home '/home/sweet/home/:user', :controller => 'home', :action => 'index' map.connect ':controller/:action/:id' end @@ -96,7 +96,7 @@ class UrlWriterTests < Test::Unit::TestCase def test_only_path ActionController::Routing::Routes.draw do |map| - map.home '/home/sweet/home/:user' + map.home '/home/sweet/home/:user', :controller => 'home', :action => 'index' map.connect ':controller/:action/:id' end |