diff options
author | Andrew White <andrew.white@unboxed.co> | 2017-03-01 11:36:54 +0000 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2017-03-01 11:36:54 +0000 |
commit | 3efad391e6bcdab2b86aacc45b9a7ade509e6c4f (patch) | |
tree | 226068cbc29467e782c082ebd28a68ac53e91932 /activerecord/test | |
parent | 89d5d975e5405236816257d6de87acd268d6ce8c (diff) | |
download | rails-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')
-rw-r--r-- | activerecord/test/cases/calculations_test.rb | 2 |
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] |