diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-10-27 22:45:29 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-27 22:45:29 +0900 |
commit | 6c98dad59d29bc26b4957d2b7547b16bc9919526 (patch) | |
tree | 8f4a03fda9b1c5e0b3825fd6abdb1e7bfd8789a0 /activerecord/test | |
parent | 5431e17733366da1fd10f2cd3039d66a56012683 (diff) | |
parent | 4694fcf4133a74bb0689e4888e73aa2f605394f7 (diff) | |
download | rails-6c98dad59d29bc26b4957d2b7547b16bc9919526.tar.gz rails-6c98dad59d29bc26b4957d2b7547b16bc9919526.tar.bz2 rails-6c98dad59d29bc26b4957d2b7547b16bc9919526.zip |
Merge pull request #34329 from r7kamura/feature/where-exclamation-consistency
Ignore empty condition on #construct_relation_for_exists
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 355fb4517f..dafbf67456 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -246,6 +246,10 @@ class FinderTest < ActiveRecord::TestCase assert_equal true, Topic.first.replies.exists? end + def test_exists_with_empty_hash_arg + assert_equal true, Topic.exists?({}) + end + # Ensure +exists?+ runs without an error by excluding distinct value. # See https://github.com/rails/rails/pull/26981. def test_exists_with_order_and_distinct |