Browse files

Add failing test

  • Loading branch information...
1 parent 941d5c1 commit e174923d29328be9e5373d334ebdb25390687983 @oriolgual oriolgual committed Jun 8, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 activerecord/test/cases/relation_scoping_test.rb
View
4 activerecord/test/cases/relation_scoping_test.rb
@@ -15,6 +15,10 @@ def test_reverse_order
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

0 comments on commit e174923

Please sign in to comment.