diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-11-24 19:18:01 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-11-24 19:18:01 -0700 |
commit | 9545e6edc7a916465c8345afa4d48f29b8687a26 (patch) | |
tree | a4fc6ec89968fedc6a84ce18edfbb52307b3f32b /actionpack/test/dispatch/routing | |
parent | a381820f60588ed356b4abb365e646dff0eaff73 (diff) | |
parent | 4d84922840deb89754f5b5fb61ebea0aeadc52df (diff) | |
download | rails-9545e6edc7a916465c8345afa4d48f29b8687a26.tar.gz rails-9545e6edc7a916465c8345afa4d48f29b8687a26.tar.bz2 rails-9545e6edc7a916465c8345afa4d48f29b8687a26.zip |
Merge branch 'deprecate-string-options-in-url-helpers'
Diffstat (limited to 'actionpack/test/dispatch/routing')
-rw-r--r-- | actionpack/test/dispatch/routing/route_set_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing/route_set_test.rb b/actionpack/test/dispatch/routing/route_set_test.rb index a7acc0de41..5a39119446 100644 --- a/actionpack/test/dispatch/routing/route_set_test.rb +++ b/actionpack/test/dispatch/routing/route_set_test.rb @@ -160,6 +160,26 @@ module ActionDispatch assert_equal '/foo/1/bar/2', url_helpers.foo_bar_path(2, foo_id: 1) end + test "stringified controller and action keys are properly symbolized" do + draw do + root 'foo#bar' + end + + assert_deprecated do + assert_equal '/', url_helpers.root_path('controller' => 'foo', 'action' => 'bar') + end + end + + test "mix of string and symbol keys are properly symbolized" do + draw do + root 'foo#bar' + end + + assert_deprecated do + assert_equal '/', url_helpers.root_path('controller' => 'foo', :action => 'bar') + end + end + private def draw(&block) @set.draw(&block) |