diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-01 02:04:35 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-01 02:04:35 +0000 |
commit | 74b7bfa6d2c5c777b11cb6ea8687c0461b579f7e (patch) | |
tree | 78d7825a0a49d20f0a58dfc5a125b2ad191a0303 /activerecord/test | |
parent | 97f4a5aa14fa4890b734fd1574fad87e240c0823 (diff) | |
download | rails-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.rb | 10 |
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 |