diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-02-09 21:10:53 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-02-09 22:30:43 +0100 |
commit | 9e10d591991e8e52488880f5c0d518590716d225 (patch) | |
tree | ddac9a14cbdd6ed244b11d94f7636ffa864767c0 /actionpack/test | |
parent | 9c5cc89ede353c1b756d294ee28e4d011655b164 (diff) | |
download | rails-9e10d591991e8e52488880f5c0d518590716d225.tar.gz rails-9e10d591991e8e52488880f5c0d518590716d225.tar.bz2 rails-9e10d591991e8e52488880f5c0d518590716d225.zip |
the `:controller` option for routes can contain numbers. closes #9231.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index fb1b8526d0..143733254b 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -1031,6 +1031,18 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest assert_equal 'users/home#index', @response.body end + def test_namespace_containing_numbers + draw do + namespace :v2 do + resources :subscriptions + end + end + + get '/v2/subscriptions' + assert_equal 'v2/subscriptions#index', @response.body + assert_equal '/v2/subscriptions', v2_subscriptions_path + end + def test_articles_with_id draw do controller :articles do |