diff options
author | Byron Bischoff <byronb@gmail.com> | 2014-01-24 13:07:02 -0800 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2014-01-25 07:19:33 +0000 |
commit | 345555cd4cfd6fad68752292e5780387672e167e (patch) | |
tree | 6a8b07375a4d0aa1f968fd0263e8086682c4e5c8 /actionpack/test/dispatch/routing | |
parent | 94ce51445eb70fb168640c0404b7fc1985365f67 (diff) | |
download | rails-345555cd4cfd6fad68752292e5780387672e167e.tar.gz rails-345555cd4cfd6fad68752292e5780387672e167e.tar.bz2 rails-345555cd4cfd6fad68752292e5780387672e167e.zip |
Transform dashes to underscores in resource route names
Fixes #13824
Diffstat (limited to 'actionpack/test/dispatch/routing')
-rw-r--r-- | actionpack/test/dispatch/routing/inspector_test.rb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/actionpack/test/dispatch/routing/inspector_test.rb b/actionpack/test/dispatch/routing/inspector_test.rb index 74515e3f57..ff33dd5652 100644 --- a/actionpack/test/dispatch/routing/inspector_test.rb +++ b/actionpack/test/dispatch/routing/inspector_test.rb @@ -185,12 +185,22 @@ module ActionDispatch output = draw do get 'about-us' => 'pages#about_us' get 'our-work/latest' + + resources :photos, only: [:show] do + get 'user-favorites', on: :collection + get 'preview-photo', on: :member + get 'summary-text' + end end assert_equal [ - " Prefix Verb URI Pattern Controller#Action", - " about_us GET /about-us(.:format) pages#about_us", - "our_work_latest GET /our-work/latest(.:format) our_work#latest" + " Prefix Verb URI Pattern Controller#Action", + " about_us GET /about-us(.:format) pages#about_us", + " our_work_latest GET /our-work/latest(.:format) our_work#latest", + "user_favorites_photos GET /photos/user-favorites(.:format) photos#user_favorites", + " preview_photo_photo GET /photos/:id/preview-photo(.:format) photos#preview_photo", + " photo_summary_text GET /photos/:photo_id/summary-text(.:format) photos#summary_text", + " photo GET /photos/:id(.:format) photos#show" ], output end |