compare sorted arrays in relations_test

Oracle does not guarantee that SELECT will return records ordered by primary key
This commit is contained in:
Raimonds Simanovskis
2010-06-04 22:58:55 +03:00
parent c51fa6bdfc
commit acef8feafa

View File

@@ -114,7 +114,7 @@ class RelationTest < ActiveRecord::TestCase
def test_select_with_block
even_ids = Developer.scoped.select {|d| d.id % 2 == 0 }.map(&:id)
assert_equal [2, 4, 6, 8, 10], even_ids
assert_equal [2, 4, 6, 8, 10], even_ids.sort
end
def test_finding_with_hash_conditions_on_joined_table