diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-04-22 12:33:54 -0300 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-22 09:06:55 -0700 |
commit | 920df0a4758d003dc284c13e439e0b9f60a6e6f0 (patch) | |
tree | f273a8e72873dce59e717d948e410df47be18940 /actionpack/test/controller | |
parent | 2472f1026a7d3b3309937568204a5b46b60c2c3c (diff) | |
download | rails-920df0a4758d003dc284c13e439e0b9f60a6e6f0.tar.gz rails-920df0a4758d003dc284c13e439e0b9f60a6e6f0.tar.bz2 rails-920df0a4758d003dc284c13e439e0b9f60a6e6f0.zip |
Make ActionDispatch url_for use HWIA symbolize_keys
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/url_for_test.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/actionpack/test/controller/url_for_test.rb b/actionpack/test/controller/url_for_test.rb index 501f928e05..907acf9573 100644 --- a/actionpack/test/controller/url_for_test.rb +++ b/actionpack/test/controller/url_for_test.rb @@ -258,13 +258,17 @@ module AbstractController end def test_with_stringified_keys - assert_equal("/c/a", W.new.url_for('controller' => 'c', 'action' => 'a', 'only_path' => true)) assert_equal("/c", W.new.url_for('controller' => 'c', 'only_path' => true)) + assert_equal("/c/a", W.new.url_for('controller' => 'c', 'action' => 'a', 'only_path' => true)) end def test_with_hash_with_indifferent_access - assert_equal("/c/a", W.new.url_for(HashWithIndifferentAccess.new('controller' => 'c', 'action' => 'a', 'only_path' => true))) + W.default_url_options[:controller] = 'd' + W.default_url_options[:only_path] = false assert_equal("/c", W.new.url_for(HashWithIndifferentAccess.new('controller' => 'c', 'only_path' => true))) + + W.default_url_options[:action] = 'b' + assert_equal("/c/a", W.new.url_for(HashWithIndifferentAccess.new('controller' => 'c', 'action' => 'a', 'only_path' => true))) end private @@ -273,4 +277,4 @@ module AbstractController end end end -end
\ No newline at end of file +end |