mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
4dc2dc1402
commit
6baedb0936
1 changed files with 4 additions and 4 deletions
|
@ -55,25 +55,25 @@ class EagerAssociationTest < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_eager_association_loading_with_belongs_to_and_limit
|
def test_eager_association_loading_with_belongs_to_and_limit
|
||||||
comments = Comment.find(:all, :include => :post, :limit => 5)
|
comments = Comment.find(:all, :include => :post, :limit => 5, :order => 'comments.id')
|
||||||
assert_equal 5, comments.length
|
assert_equal 5, comments.length
|
||||||
assert_equal [1,2,3,5,6], comments.collect { |c| c.id }
|
assert_equal [1,2,3,5,6], comments.collect { |c| c.id }
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_eager_association_loading_with_belongs_to_and_limit_and_conditions
|
def test_eager_association_loading_with_belongs_to_and_limit_and_conditions
|
||||||
comments = Comment.find(:all, :include => :post, :conditions => 'post_id = 4', :limit => 3)
|
comments = Comment.find(:all, :include => :post, :conditions => 'post_id = 4', :limit => 3, :order => 'comments.id')
|
||||||
assert_equal 3, comments.length
|
assert_equal 3, comments.length
|
||||||
assert_equal [5,6,7], comments.collect { |c| c.id }
|
assert_equal [5,6,7], comments.collect { |c| c.id }
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_eager_association_loading_with_belongs_to_and_limit_and_offset
|
def test_eager_association_loading_with_belongs_to_and_limit_and_offset
|
||||||
comments = Comment.find(:all, :include => :post, :limit => 3, :offset => 2)
|
comments = Comment.find(:all, :include => :post, :limit => 3, :offset => 2, :order => 'comments.id')
|
||||||
assert_equal 3, comments.length
|
assert_equal 3, comments.length
|
||||||
assert_equal [3,5,6], comments.collect { |c| c.id }
|
assert_equal [3,5,6], comments.collect { |c| c.id }
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_eager_association_loading_with_belongs_to_and_limit_and_offset_and_conditions
|
def test_eager_association_loading_with_belongs_to_and_limit_and_offset_and_conditions
|
||||||
comments = Comment.find(:all, :include => :post, :conditions => 'post_id = 4', :limit => 3, :offset => 1)
|
comments = Comment.find(:all, :include => :post, :conditions => 'post_id = 4', :limit => 3, :offset => 1, :order => 'comments.id')
|
||||||
assert_equal 3, comments.length
|
assert_equal 3, comments.length
|
||||||
assert_equal [6,7,8], comments.collect { |c| c.id }
|
assert_equal [6,7,8], comments.collect { |c| c.id }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue