aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-08-05 11:20:15 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-08-05 11:20:15 -0700
commit5a05207d99b7e2678f9b42db2d9ffc21ec2c8c3b (patch)
treeeae057b72351899267859fc86c4c5d52308f39ca /activerecord/test
parent04f88d163094a8b5fa56ba8178cec56aa3ea6b79 (diff)
downloadrails-5a05207d99b7e2678f9b42db2d9ffc21ec2c8c3b.tar.gz
rails-5a05207d99b7e2678f9b42db2d9ffc21ec2c8c3b.tar.bz2
rails-5a05207d99b7e2678f9b42db2d9ffc21ec2c8c3b.zip
pg does not allow aliases in the having clause, but functions are fine
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/calculations_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index 42f98b3d42..c38814713a 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -171,7 +171,7 @@ class CalculationsTest < ActiveRecord::TestCase
end
def test_should_group_by_summed_field_having_condition_from_select
- c = Account.select("MIN(credit_limit) AS min_credit_limit").group(:firm_id).having("min_credit_limit > 50").sum(:credit_limit)
+ c = Account.select("MIN(credit_limit) AS min_credit_limit").group(:firm_id).having("MIN(credit_limit) > 50").sum(:credit_limit)
assert_nil c[1]
assert_equal 60, c[2]
assert_equal 53, c[9]