diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-05-09 03:51:06 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-05-09 03:51:06 +0000 |
commit | 08736788c906d2b05fe6c45e6922e594149c9b12 (patch) | |
tree | 40430c567a1662a958ee78aa230b5c1431dc4fdb /activeresource/test/base_test.rb | |
parent | 2b6ad48ea3c80e693b3c92f90432c790c8ee1510 (diff) | |
download | rails-08736788c906d2b05fe6c45e6922e594149c9b12.tar.gz rails-08736788c906d2b05fe6c45e6922e594149c9b12.tar.bz2 rails-08736788c906d2b05fe6c45e6922e594149c9b12.zip |
Handle string and symbol param keys when splitting params into prefix params and query params.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6703 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/test/base_test.rb')
-rw-r--r-- | activeresource/test/base_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activeresource/test/base_test.rb b/activeresource/test/base_test.rb index e9bf5d70b3..db02cc2716 100644 --- a/activeresource/test/base_test.rb +++ b/activeresource/test/base_test.rb @@ -109,10 +109,12 @@ class BaseTest < Test::Unit::TestCase def test_custom_element_path assert_equal '/people/1/addresses/1.xml', StreetAddress.element_path(1, :person_id => 1) + assert_equal '/people/1/addresses/1.xml', StreetAddress.element_path(1, 'person_id' => 1) end def test_custom_element_path_with_parameters assert_equal '/people/1/addresses/1.xml?type=work', StreetAddress.element_path(1, :person_id => 1, :type => 'work') + assert_equal '/people/1/addresses/1.xml?type=work', StreetAddress.element_path(1, 'person_id' => 1, :type => 'work') assert_equal '/people/1/addresses/1.xml?type=work', StreetAddress.element_path(1, :type => 'work', :person_id => 1) assert_equal '/people/1/addresses/1.xml?type%5B%5D=work&type%5B%5D=play+time', StreetAddress.element_path(1, :person_id => 1, :type => ['work', 'play time']) end @@ -123,10 +125,12 @@ class BaseTest < Test::Unit::TestCase def test_custom_collection_path assert_equal '/people/1/addresses.xml', StreetAddress.collection_path(:person_id => 1) + assert_equal '/people/1/addresses.xml', StreetAddress.collection_path('person_id' => 1) end def test_custom_collection_path_with_parameters assert_equal '/people/1/addresses.xml?type=work', StreetAddress.collection_path(:person_id => 1, :type => 'work') + assert_equal '/people/1/addresses.xml?type=work', StreetAddress.collection_path('person_id' => 1, :type => 'work') end def test_custom_collection_path_with_prefix_and_parameters |