diff options
author | Dylan Thacker-Smith <Dylan.Smith@shopify.com> | 2019-01-17 13:33:30 -0500 |
---|---|---|
committer | Dylan Thacker-Smith <Dylan.Smith@shopify.com> | 2019-01-17 13:37:11 -0500 |
commit | 242fc54f57d8db96eb2d34b1db19b9a61d7412b7 (patch) | |
tree | dde995ef2f3a1e5aef63ed37e2fcf3ae41c48fd7 /activerecord/test/cases | |
parent | 2dee59fed1e78b983aed4db53dc8fc59e49b9200 (diff) | |
download | rails-242fc54f57d8db96eb2d34b1db19b9a61d7412b7.tar.gz rails-242fc54f57d8db96eb2d34b1db19b9a61d7412b7.tar.bz2 rails-242fc54f57d8db96eb2d34b1db19b9a61d7412b7.zip |
activerecord: Use a simpler query condition for aggregates with one mapping
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 1c53362bac..6a051c3213 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -947,6 +947,7 @@ class FinderTest < ActiveRecord::TestCase assert_kind_of Money, zaphod_balance found_customers = Customer.where(balance: [david_balance, zaphod_balance]) assert_equal [customers(:david), customers(:zaphod)], found_customers.sort_by(&:id) + assert_equal Customer.where(balance: [david_balance.amount, zaphod_balance.amount]).to_sql, found_customers.to_sql end def test_hash_condition_find_with_aggregate_attribute_having_same_name_as_field_and_key_value_being_aggregate |