diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-10-19 19:33:25 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-10-19 19:33:25 +0100 |
commit | 383d545c88266ef579f225bc8bfb3d3b807ca5bc (patch) | |
tree | 8848cf38692acd9277e0d4f271ad9f569ad40c2b | |
parent | d15de7d97f7080d8d3bc47bef89aa8a922f04c67 (diff) | |
download | rails-383d545c88266ef579f225bc8bfb3d3b807ca5bc.tar.gz rails-383d545c88266ef579f225bc8bfb3d3b807ca5bc.tar.bz2 rails-383d545c88266ef579f225bc8bfb3d3b807ca5bc.zip |
Add explicit ordering in relations_test.rb, as the lack of this was causing failures against postgres
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 0d88c8eded..0b143224be 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -251,27 +251,27 @@ class RelationTest < ActiveRecord::TestCase def test_find_with_preloaded_associations assert_queries(2) do - posts = Post.preload(:comments) + posts = Post.preload(:comments).order('posts.id') assert posts.first.comments.first end assert_queries(2) do - posts = Post.preload(:comments).to_a + posts = Post.preload(:comments).order('posts.id').to_a assert posts.first.comments.first end assert_queries(2) do - posts = Post.preload(:author) + posts = Post.preload(:author).order('posts.id') assert posts.first.author end assert_queries(2) do - posts = Post.preload(:author).to_a + posts = Post.preload(:author).order('posts.id').to_a assert posts.first.author end assert_queries(3) do - posts = Post.preload(:author, :comments).to_a + posts = Post.preload(:author, :comments).order('posts.id').to_a assert posts.first.author assert posts.first.comments.first end @@ -279,22 +279,22 @@ class RelationTest < ActiveRecord::TestCase def test_find_with_included_associations assert_queries(2) do - posts = Post.includes(:comments) + posts = Post.includes(:comments).order('posts.id') assert posts.first.comments.first end assert_queries(2) do - posts = Post.scoped.includes(:comments) + posts = Post.scoped.includes(:comments).order('posts.id') assert posts.first.comments.first end assert_queries(2) do - posts = Post.includes(:author) + posts = Post.includes(:author).order('posts.id') assert posts.first.author end assert_queries(3) do - posts = Post.includes(:author, :comments).to_a + posts = Post.includes(:author, :comments).order('posts.id').to_a assert posts.first.author assert posts.first.comments.first end |