diff options
author | Oriol Gual <oriol.gual@gmail.com> | 2011-06-08 20:54:27 +0200 |
---|---|---|
committer | Oriol Gual <oriol.gual@gmail.com> | 2011-06-28 22:10:50 +0200 |
commit | e174923d29328be9e5373d334ebdb25390687983 (patch) | |
tree | b2463df1ad69fa541592dc55ad95421b9d00f4b4 /activerecord | |
parent | 941d5c1f4051416e1b7993374343e343027978a7 (diff) | |
download | rails-e174923d29328be9e5373d334ebdb25390687983.tar.gz rails-e174923d29328be9e5373d334ebdb25390687983.tar.bz2 rails-e174923d29328be9e5373d334ebdb25390687983.zip |
Add failing test
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/relation_scoping_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation_scoping_test.rb b/activerecord/test/cases/relation_scoping_test.rb index 77b7648576..5a309af7f7 100644 --- a/activerecord/test/cases/relation_scoping_test.rb +++ b/activerecord/test/cases/relation_scoping_test.rb @@ -15,6 +15,10 @@ class RelationScopingTest < ActiveRecord::TestCase assert_equal Developer.order("id DESC").to_a.reverse, Developer.order("id DESC").reverse_order end + def test_reverse_order_with_arel_node + assert_equal Developer.order("id DESC").to_a.reverse, Developer.order(Developer.arel_table[:id].desc).reverse_order + end + def test_double_reverse_order_produces_original_order assert_equal Developer.order("name DESC"), Developer.order("name DESC").reverse_order.reverse_order end |