aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/finder_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/finder_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/finder_test.rb')
-rw-r--r--activerecord/test/cases/finder_test.rb4
1 files changed, 2 insertions, 2 deletions
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