diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-06-25 19:22:45 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-26 00:59:11 +0200 |
commit | a2513aea07255877b66b846fcf7ebb35629199df (patch) | |
tree | 9f96752df3e5d5597bc4ad0c500ff38877d57eb8 /activerecord/test/cases | |
parent | cae33c41589373d62c76e2bb3cdb3fa023ec8521 (diff) | |
download | rails-a2513aea07255877b66b846fcf7ebb35629199df.tar.gz rails-a2513aea07255877b66b846fcf7ebb35629199df.tar.bz2 rails-a2513aea07255877b66b846fcf7ebb35629199df.zip |
Test for concatenated orders added
[#4972]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 5b1c6b8f22..821b4585a7 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -110,6 +110,12 @@ class RelationTest < ActiveRecord::TestCase assert_equal topics(:first).title, topics.first.title end + def test_finding_with_order_concatenated + topics = Topic.order('author_name').order('title') + assert_equal 4, topics.to_a.size + assert_equal topics(:fourth).title, topics.first.title + end + def test_finding_with_order_and_take entrants = Entrant.order("id ASC").limit(2).to_a |