Permalink
Browse files

Fix order dependent tests

  • Loading branch information...
rafaelfranca committed Oct 22, 2013
1 parent 3449a20 commit 86db9bc0896d374eb723427904ed6599c9507a85
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/test/cases/relations_test.rb
@@ -634,21 +634,21 @@ def test_find_all_using_where_with_relation
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

0 comments on commit 86db9bc

Please sign in to comment.