diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-03-15 03:50:47 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-03-15 03:50:47 +0000 |
commit | fa4fb50186cb80e824ce1a6a91bde2c2870628de (patch) | |
tree | 1d6603666a2ea2eaf48dfa02b434e532c32ac9e9 | |
parent | c42cd3c3834e13bd9eb0a444e0d6073aee548125 (diff) | |
download | rails-fa4fb50186cb80e824ce1a6a91bde2c2870628de.tar.gz rails-fa4fb50186cb80e824ce1a6a91bde2c2870628de.tar.bz2 rails-fa4fb50186cb80e824ce1a6a91bde2c2870628de.zip |
fix calculation tests to get around inconsistent ordering of nils
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | activerecord/test/calculations_test.rb | 4 |
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 |