aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-06-01 02:04:35 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-06-01 02:04:35 +0000
commit74b7bfa6d2c5c777b11cb6ea8687c0461b579f7e (patch)
tree78d7825a0a49d20f0a58dfc5a125b2ad191a0303 /activerecord/test
parent97f4a5aa14fa4890b734fd1574fad87e240c0823 (diff)
downloadrails-74b7bfa6d2c5c777b11cb6ea8687c0461b579f7e.tar.gz
rails-74b7bfa6d2c5c777b11cb6ea8687c0461b579f7e.tar.bz2
rails-74b7bfa6d2c5c777b11cb6ea8687c0461b579f7e.zip
Mind the order of things.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4393 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/finder_test.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb
index e04d02d9cb..1cd16c7cd8 100644
--- a/activerecord/test/finder_test.rb
+++ b/activerecord/test/finder_test.rb
@@ -387,13 +387,9 @@ class FinderTest < Test::Unit::TestCase
end
def test_find_by_records
- p1, p2 = Post.find(1, 2)
- assert_equal [p1, p2], Post.find(:all, :conditions => ['id in (?)', [p1, p2]]).sort_by { |p| p.id }
- end
-
- def test_find_by_records_and_ids
- p1, p2 = Post.find(1, 2)
- assert_equal [p1, p2], Post.find(:all, :conditions => ['id in (?)', [p1, p2.id]]).sort_by { |p| p.id }
+ p1, p2 = Post.find(:all, :limit => 2, :order => 'id asc')
+ assert_equal [p1, p2], Post.find(:all, :conditions => ['id in (?)', [p1, p2]], :order => 'id asc')
+ assert_equal [p1, p2], Post.find(:all, :conditions => ['id in (?)', [p1, p2.id]], :order => 'id asc')
end
def test_select_value