aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaimonds Simanovskis <raimonds.simanovskis@gmail.com>2011-08-30 20:37:16 +0300
committerJon Leighton <j@jonathanleighton.com>2011-08-30 22:33:49 +0100
commit60d8e4ac28726d04d029b25cff82181a9b0ab5c3 (patch)
tree4f3169ef122e38b12a675519843b08906eeb278e
parent2350fecd2251584d770afc4bd1764b3fe526ff70 (diff)
downloadrails-60d8e4ac28726d04d029b25cff82181a9b0ab5c3.tar.gz
rails-60d8e4ac28726d04d029b25cff82181a9b0ab5c3.tar.bz2
rails-60d8e4ac28726d04d029b25cff82181a9b0ab5c3.zip
Ensure correct ordering of results in test_update_all_with_joins_and_offset_and_order
Last two asserts in this test assume that all_comments are ordered by posts.id and then by comments.id therefore additional ordering is added. Without it test was failing on Oracle which returned results in different order.
-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 615551a279..da96afd718 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -1018,7 +1018,7 @@ class RelationTest < ActiveRecord::TestCase
end
def test_update_all_with_joins_and_offset_and_order
- all_comments = Comment.joins(:post).where('posts.id' => posts(:welcome).id).order('posts.id')
+ all_comments = Comment.joins(:post).where('posts.id' => posts(:welcome).id).order('posts.id', 'comments.id')
count = all_comments.count
comments = all_comments.offset(1)