aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relations_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-10-22 00:25:17 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-10-22 11:35:33 -0200
commit5ad34a8d8d4be8ca6f89f9f4850b07681f7111af (patch)
treebe7954b80f2e3b345b71896929948ac3bb780abb /activerecord/test/cases/relations_test.rb
parentebeb87eca8424bad214a50b7fb9b2704f102d34d (diff)
downloadrails-5ad34a8d8d4be8ca6f89f9f4850b07681f7111af.tar.gz
rails-5ad34a8d8d4be8ca6f89f9f4850b07681f7111af.tar.bz2
rails-5ad34a8d8d4be8ca6f89f9f4850b07681f7111af.zip
Fix order dependent tests
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r--activerecord/test/cases/relations_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index 55501ea35b..c9c7ac04b3 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -648,21 +648,21 @@ class RelationTest < ActiveRecord::TestCase
def test_find_all_using_where_with_relation_with_bound_values
david = authors(:david)
- davids_posts = david.posts.to_a
+ davids_posts = david.posts.order(:id).to_a
assert_queries(1) do
relation = Post.where(id: david.posts.select(:id))
- assert_equal davids_posts, relation.to_a
+ assert_equal davids_posts, relation.order(:id).to_a
end
assert_queries(1) do
relation = Post.where('id in (?)', david.posts.select(:id))
- assert_equal davids_posts, relation.to_a, 'should process Relation as bind variables'
+ assert_equal davids_posts, relation.order(:id).to_a, 'should process Relation as bind variables'
end
assert_queries(1) do
relation = Post.where('id in (:post_ids)', post_ids: david.posts.select(:id))
- assert_equal davids_posts, relation.to_a, 'should process Relation as named bind variables'
+ assert_equal davids_posts, relation.order(:id).to_a, 'should process Relation as named bind variables'
end
end