Skip to content
This repository
Browse code

Don't test for hash sort order.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6147 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 39ae7025e84e35785e11d9fed059e74e70745ee3 1 parent eb2dad2
Jeremy Kemper jeremy authored

Showing 1 changed file with 7 additions and 6 deletions. Show diff stats Hide diff stats

  1. +7 6 activesupport/test/core_ext/hash_ext_test.rb
13 activesupport/test/core_ext/hash_ext_test.rb
@@ -532,19 +532,20 @@ class QueryTest < Test::Unit::TestCase
532 532 def test_simple_conversion
533 533 assert_equal 'a=10', {:a => 10}.to_query
534 534 end
535   -
  535 +
536 536 def test_nested_conversion
537   - assert_equal 'person[name]=Nicholas&person[login]=seckar',
538   - {:person => {:name => 'Nicholas', :login => 'seckar'}}.to_query
  537 + expected = %w(person[name]=Nicholas person[login]=seckar)
  538 + actual = {:person => {:name => 'Nicholas', :login => 'seckar'}}.to_query
  539 + assert_equal expected.sort, actual.split('&').sort
539 540 end
540   -
  541 +
541 542 def test_multiple_nested
542 543 assert_equal 'account[person][id]=20&person[id]=10',
543 544 {:person => {:id => 10}, :account => {:person => {:id => 20}}}.to_query
544 545 end
545   -
  546 +
546 547 def test_array_values
547 548 assert_equal 'person[id][]=10&person[id][]=20',
548 549 {:person => {:id => [10, 20]}}.to_query
549 550 end
550   -end
  551 +end

0 comments on commit 39ae702

Please sign in to comment.
Something went wrong with that request. Please try again.