aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relations_test.rb
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-03-22 11:08:04 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-03-22 22:41:10 -0300
commitb332891b2ab4188e9d39737f4d214812afa3ce2c (patch)
tree72974490c032f9a753f3fc41d335a049c8abbc05 /activerecord/test/cases/relations_test.rb
parentb714140f4df50d102e70b0151bbb3a09e470d61a (diff)
downloadrails-b332891b2ab4188e9d39737f4d214812afa3ce2c.tar.gz
rails-b332891b2ab4188e9d39737f4d214812afa3ce2c.tar.bz2
rails-b332891b2ab4188e9d39737f4d214812afa3ce2c.zip
Add order to tests that rely on db ordering, to fix failing tests on pg
Also skip persistente tests related to UPDATE + ORDER BY for postgresql PostgreSQL does not support updates with order by, and these tests are failing randomly depending on the fixture loading order now.
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r--activerecord/test/cases/relations_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index 5e0caf5fce..bf2807c384 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -674,7 +674,7 @@ class RelationTest < ActiveRecord::TestCase
def test_relation_merging_with_preload
ActiveRecord::IdentityMap.without do
[Post.scoped.merge(Post.preload(:author)), Post.preload(:author).merge(Post.scoped)].each do |posts|
- assert_queries(2) { assert posts.first.author }
+ assert_queries(2) { assert posts.order(:id).first.author }
end
end
end