From be968ecd8b93f128a01427f76c888c291cbc239b Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 13 Jan 2010 20:21:04 -0600 Subject: Respect resources_path_names and :path_names options in new dsl --- actionpack/test/dispatch/routing_test.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'actionpack/test/dispatch/routing_test.rb') diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 984cbffd9f..87d8d7730a 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -52,6 +52,10 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest get 'admin/accounts' => "queenbee#accounts" end + scope 'es' do + resources :projects, :path_names => { :edit => 'cambiar' }, :as => 'projeto' + end + resources :projects, :controller => :project do resources :involvements, :attachments @@ -449,6 +453,16 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end + def test_path_names + with_test_routes do + get '/es/projeto' + assert_equal 'projects#index', @response.body + + get '/es/projeto/1/cambiar' + assert_equal 'projects#edit', @response.body + end + end + def test_sprockets with_test_routes do get '/sprockets.js' -- cgit v1.2.3