aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2010-01-13 20:21:04 -0600
committerJoshua Peek <josh@joshpeek.com>2010-01-13 20:26:01 -0600
commitbe968ecd8b93f128a01427f76c888c291cbc239b (patch)
tree764143daabc9310ef8d81ab1c0fd64280ea3e0b4 /actionpack/test/dispatch/routing_test.rb
parent0f51e45307508d72f65b733dbbbd1c62f27a8bef (diff)
downloadrails-be968ecd8b93f128a01427f76c888c291cbc239b.tar.gz
rails-be968ecd8b93f128a01427f76c888c291cbc239b.tar.bz2
rails-be968ecd8b93f128a01427f76c888c291cbc239b.zip
Respect resources_path_names and :path_names options in new dsl
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb14
1 files changed, 14 insertions, 0 deletions
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'