Skip to content
This repository
Browse code

Make all tests pass on PGSQL #1759 [Rick Olson]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 6baedb09362c12dca48863b6a26aa42c6e253019 1 parent 4dc2dc1
David Heinemeier Hansson authored July 17, 2005
8  activerecord/test/associations_go_eager_test.rb
@@ -55,25 +55,25 @@ def test_eager_association_loading_with_belongs_to
55 55
   end
56 56
   
57 57
   def test_eager_association_loading_with_belongs_to_and_limit
58  
-    comments = Comment.find(:all, :include => :post, :limit => 5)
  58
+    comments = Comment.find(:all, :include => :post, :limit => 5, :order => 'comments.id')
59 59
     assert_equal 5, comments.length
60 60
     assert_equal [1,2,3,5,6], comments.collect { |c| c.id }
61 61
   end
62 62
 
63 63
   def test_eager_association_loading_with_belongs_to_and_limit_and_conditions
64  
-    comments = Comment.find(:all, :include => :post, :conditions => 'post_id = 4', :limit => 3)
  64
+    comments = Comment.find(:all, :include => :post, :conditions => 'post_id = 4', :limit => 3, :order => 'comments.id')
65 65
     assert_equal 3, comments.length
66 66
     assert_equal [5,6,7], comments.collect { |c| c.id }
67 67
   end
68 68
 
69 69
   def test_eager_association_loading_with_belongs_to_and_limit_and_offset
70  
-    comments = Comment.find(:all, :include => :post, :limit => 3, :offset => 2)
  70
+    comments = Comment.find(:all, :include => :post, :limit => 3, :offset => 2, :order => 'comments.id')
71 71
     assert_equal 3, comments.length
72 72
     assert_equal [3,5,6], comments.collect { |c| c.id }
73 73
   end
74 74
 
75 75
   def test_eager_association_loading_with_belongs_to_and_limit_and_offset_and_conditions
76  
-    comments = Comment.find(:all, :include => :post, :conditions => 'post_id = 4', :limit => 3, :offset => 1)
  76
+    comments = Comment.find(:all, :include => :post, :conditions => 'post_id = 4', :limit => 3, :offset => 1, :order => 'comments.id')
77 77
     assert_equal 3, comments.length
78 78
     assert_equal [6,7,8], comments.collect { |c| c.id }
79 79
   end

0 notes on commit 6baedb0

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