Simplify the test by using id and name. id will be the only real sort criteria in any case as it's unique.

This commit is contained in:
Franck Verrot
2011-07-26 11:36:18 +02:00
committed by Xavier Noria
parent 16e3c40426
commit 5004aaffc1

View File

@@ -963,6 +963,6 @@ class RelationTest < ActiveRecord::TestCase
end
def test_ordering_with_extra_spaces
assert_equal authors(:david), Author.order('organization_id ASC , owned_essay_id DESC').last
assert_equal authors(:david), Author.order('id DESC , name DESC').last
end
end