diff options
author | Franck Verrot <franck@verrot.fr> | 2011-07-26 11:36:18 +0200 |
---|---|---|
committer | Franck Verrot <franck@verrot.fr> | 2011-07-26 11:36:18 +0200 |
commit | 41902e6932d46e3142185ee8d75dd861d0424d4e (patch) | |
tree | 18643e3f6934505fe3298d6d722c65216d26e94a /activerecord/test | |
parent | b4e577945b882594425082ae16e2076cc82bdc72 (diff) | |
download | rails-41902e6932d46e3142185ee8d75dd861d0424d4e.tar.gz rails-41902e6932d46e3142185ee8d75dd861d0424d4e.tar.bz2 rails-41902e6932d46e3142185ee8d75dd861d0424d4e.zip |
Simplify the test by using id and name. `id` will be the only real sort criteria in any case as it's unique.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 6363cae371..821da91f0a 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -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 |