diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-18 11:05:24 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-18 11:05:24 -0500 |
commit | 91726c201bf91b08dcb75f8d129d1002c489b79d (patch) | |
tree | 9d41417393afc27858fdf7d44619cdaedfc8a294 /actionpack/test | |
parent | 01e04a446c801af88a1bb0315efffc775a00eedf (diff) | |
download | rails-91726c201bf91b08dcb75f8d129d1002c489b79d.tar.gz rails-91726c201bf91b08dcb75f8d129d1002c489b79d.tar.bz2 rails-91726c201bf91b08dcb75f8d129d1002c489b79d.zip |
Relax generation requirements and only enforce the requirements used in the path segment
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 8a9862a287..cbbd7e6951 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -997,19 +997,6 @@ class RouteSetTest < ActiveSupport::TestCase end end - def test_non_path_route_requirements_match_all - set.draw do |map| - map.connect 'page/37s', :controller => 'pages', :action => 'show', :name => /(jamis|david)/ - end - assert_equal '/page/37s', set.generate(:controller => 'pages', :action => 'show', :name => 'jamis') - assert_raise ActionController::RoutingError do - set.generate(:controller => 'pages', :action => 'show', :name => 'not_jamis') - end - assert_raise ActionController::RoutingError do - set.generate(:controller => 'pages', :action => 'show', :name => 'nor_jamis_and_david') - end - end - def test_recognize_with_encoded_id_and_regex set.draw do |map| map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /[a-zA-Z0-9\+]+/ |