From b332891b2ab4188e9d39737f4d214812afa3ce2c Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Thu, 22 Mar 2012 11:08:04 -0300 Subject: 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. --- activerecord/test/cases/relations_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases/relations_test.rb') 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 -- cgit v1.2.3