aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/calculations_test.rb
diff options
context:
space:
mode:
authorAndrew White <pixeltrix@users.noreply.github.com>2017-02-26 14:04:18 +0000
committerGitHub <noreply@github.com>2017-02-26 14:04:18 +0000
commit39449ef980af1547510fbf43c8e3e4b92f815b48 (patch)
tree70d2b06fd518fdcb1ca268035e43c4e26c4217bc /activerecord/test/cases/calculations_test.rb
parent0dfef8becfe32178d4fda2d068e2f9bfee8a7c40 (diff)
parent18125683ac2a23971b64a79d256ba6e252304c6f (diff)
downloadrails-39449ef980af1547510fbf43c8e3e4b92f815b48.tar.gz
rails-39449ef980af1547510fbf43c8e3e4b92f815b48.tar.bz2
rails-39449ef980af1547510fbf43c8e3e4b92f815b48.zip
Merge pull request #28183 from eugeneius/having_select_column
Include selects in group query with having clause
Diffstat (limited to 'activerecord/test/cases/calculations_test.rb')
-rw-r--r--activerecord/test/cases/calculations_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index acea955021..e70af43155 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -246,7 +246,8 @@ 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)
+ skip if current_adapter?(:PostgreSQLAdapter)
+ 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]