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/finder_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/test/cases/finder_test.rb') diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 4705252c05..c72a9dcb17 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -53,8 +53,8 @@ class FinderTest < ActiveRecord::TestCase def test_exists_with_nil_arg assert !Topic.exists?(nil) assert Topic.exists? - assert !Topic.first.replies.exists?(nil) - assert Topic.first.replies.exists? + assert !Topic.order(:id).first.replies.exists?(nil) + assert Topic.order(:id).first.replies.exists? end # ensures +exists?+ runs valid SQL by excluding order value -- cgit v1.2.3