diff options
author | Hiroshi Saito <hiroshi3110@gmail.com> | 2008-11-16 17:51:39 +0900 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-19 12:07:12 +0100 |
commit | 291d199de1271c254c44b94766d13013b222a125 (patch) | |
tree | b13420a09e248961cdabe0d61d42f050691c17b9 /actionpack/test | |
parent | f451f0e5cfa358e88ac9d03d813a9c84facd6648 (diff) | |
download | rails-291d199de1271c254c44b94766d13013b222a125.tar.gz rails-291d199de1271c254c44b94766d13013b222a125.tar.bz2 rails-291d199de1271c254c44b94766d13013b222a125.zip |
Let polymorphic_path treat an array contains single name as without array [#1386 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/polymorphic_routes_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/polymorphic_routes_test.rb b/actionpack/test/controller/polymorphic_routes_test.rb index efa3c44bc0..42dbea3b8f 100644 --- a/actionpack/test/controller/polymorphic_routes_test.rb +++ b/actionpack/test/controller/polymorphic_routes_test.rb @@ -179,6 +179,12 @@ uses_mocha 'polymorphic URL helpers' do polymorphic_url([nil, @article]) end + def test_with_array_containing_single_name + @article.save + expects(:articles_url) + polymorphic_url([:articles]) + end + # TODO: Needs to be updated to correctly know about whether the object is in a hash or not def xtest_with_hash expects(:article_url).with(@article) |