diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-22 23:50:12 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-10-22 23:50:12 +0000 |
commit | e829e12e16f0dba4a15a3b6d114fa2be107aeee2 (patch) | |
tree | e1f6f173b53f3a04a5568db76cb4e2a87e3a8d2d /activerecord | |
parent | 3334609ecb739c8cb7b488b38452ff76168a20f0 (diff) | |
download | rails-e829e12e16f0dba4a15a3b6d114fa2be107aeee2.tar.gz rails-e829e12e16f0dba4a15a3b6d114fa2be107aeee2.tar.bz2 rails-e829e12e16f0dba4a15a3b6d114fa2be107aeee2.zip |
test_select_rows shouldn't depend on implicit result ordering. Closes #9898 [lawrence]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7995 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/finder_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index 10f5bd554d..0c7a519bbb 100644 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -626,9 +626,9 @@ class FinderTest < Test::Unit::TestCase [["1", nil, nil, "37signals"], ["2", "1", "2", "Summit"], ["3", "1", "1", "Microsoft"]], - Company.connection.select_rows("SELECT id, firm_id, client_of, name FROM companies ORDER BY id LIMIT 3")) + Company.connection.select_rows("SELECT id, firm_id, client_of, name FROM companies WHERE id IN (1,2,3) ORDER BY id").map! {|i| i.map! {|j| j.to_s unless j.nil?}}) assert_equal [["1", "37signals"], ["2", "Summit"], ["3", "Microsoft"]], - Company.connection.select_rows("SELECT id, name FROM companies ORDER BY id LIMIT 3") + Company.connection.select_rows("SELECT id, name FROM companies WHERE id IN (1,2,3) ORDER BY id").map! {|i| i.map! {|j| j.to_s unless j.nil?}} end protected |