Permalink
Browse files

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
  • Loading branch information...
1 parent 3334609 commit e829e12e16f0dba4a15a3b6d114fa2be107aeee2 @jeremy jeremy committed Oct 22, 2007
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/test/finder_test.rb
@@ -626,9 +626,9 @@ def test_select_rows
[["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

0 comments on commit e829e12

Please sign in to comment.