aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/calculations_test.rb
diff options
context:
space:
mode:
authorAndrew White <andrew.white@unboxed.co>2017-03-01 11:36:54 +0000
committerAndrew White <andrew.white@unboxed.co>2017-03-01 11:36:54 +0000
commit3efad391e6bcdab2b86aacc45b9a7ade509e6c4f (patch)
tree226068cbc29467e782c082ebd28a68ac53e91932 /activerecord/test/cases/calculations_test.rb
parent89d5d975e5405236816257d6de87acd268d6ce8c (diff)
downloadrails-3efad391e6bcdab2b86aacc45b9a7ade509e6c4f.tar.gz
rails-3efad391e6bcdab2b86aacc45b9a7ade509e6c4f.tar.bz2
rails-3efad391e6bcdab2b86aacc45b9a7ade509e6c4f.zip
Whitelist adapters that support aliases in `HAVING` clause
Support for using `SELECT` column or expression aliases in the `HAVING` clause isn't part of the SQL standard so it's better to whitelist the test for adapters where we know it works and skip it on others.
Diffstat (limited to 'activerecord/test/cases/calculations_test.rb')
-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 f018156cfc..3214d778d4 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -249,7 +249,7 @@ class CalculationsTest < ActiveRecord::TestCase
end
def test_should_group_by_summed_field_having_condition_from_select
- skip if current_adapter?(:PostgreSQLAdapter, :OracleAdapter)
+ skip unless current_adapter?(:Mysql2Adapter, :SQLite3Adapter)
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]