aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/calculations_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/calculations_test.rb b/activerecord/test/calculations_test.rb
index 8f4a3de17a..0acc841712 100644
--- a/activerecord/test/calculations_test.rb
+++ b/activerecord/test/calculations_test.rb
@@ -39,13 +39,13 @@ class CalculationsTest < Test::Unit::TestCase
def test_should_order_by_grouped_field
c = Account.sum(:credit_limit, :group => :firm_id, :order => "firm_id")
- assert_equal [nil, 1, 2, 6], c.keys
+ assert_equal [1, 2, 6], c.keys.compact
end
def test_should_order_by_calculation
c = Account.sum(:credit_limit, :group => :firm_id, :order => "sum_credit_limit desc, firm_id")
assert_equal [105, 60, 50, 50], c.keys.collect { |k| c[k] }
- assert_equal [6, 2, nil, 1], c.keys
+ assert_equal [6, 2, 1], c.keys.compact
end
def test_should_group_by_summed_field_having_condition