aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-07-24 14:40:15 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-07-24 14:40:15 -0700
commit02691d3516e68b2de5545ec7a495024a377f89fc (patch)
treebc4ff885c9a5e763849096300b804cf516426cb9 /activerecord/test/cases
parent12034516e25793370cb92303301cef8249d460ac (diff)
parent77bb0b79f2ed54501046d0e983ef6b10e4bb7b9b (diff)
downloadrails-02691d3516e68b2de5545ec7a495024a377f89fc.tar.gz
rails-02691d3516e68b2de5545ec7a495024a377f89fc.tar.bz2
rails-02691d3516e68b2de5545ec7a495024a377f89fc.zip
Merge pull request #2238 from cesario/order-with-extra-spaces
Ordering with extra spaces was raising a SQL exception
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/relations_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index 0aaa0342b1..6363cae371 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -961,4 +961,8 @@ class RelationTest < ActiveRecord::TestCase
assert scope.eager_loading?
end
+
+ def test_ordering_with_extra_spaces
+ assert_equal authors(:david), Author.order('organization_id ASC , owned_essay_id DESC').last
+ end
end