Skip to content

Commit

Permalink
add test_scoped_root_as_name
Browse files Browse the repository at this point in the history
test for regression introduced by #9155
  • Loading branch information
rubys committed Sep 24, 2013
1 parent eb69a10 commit ac1613e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions actionpack/test/dispatch/routing_test.rb
Expand Up @@ -1102,6 +1102,19 @@ def test_scoped_root
assert_equal 'projects#index', @response.body
end

def test_scoped_root_as_name
draw do
scope '(:locale)', :locale => /en|pl/ do
root :to => 'projects#index', :as => 'projects'
end
end

assert_equal '/en', projects_path(:locale => 'en')
assert_equal '/', projects_path
get '/en'
assert_equal 'projects#index', @response.body
end

def test_scope_with_format_option
draw do
get "direct/index", as: :no_format_direct, format: false
Expand Down

0 comments on commit ac1613e

Please sign in to comment.