aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-10-27 22:45:29 +0900
committerGitHub <noreply@github.com>2018-10-27 22:45:29 +0900
commit6c98dad59d29bc26b4957d2b7547b16bc9919526 (patch)
tree8f4a03fda9b1c5e0b3825fd6abdb1e7bfd8789a0 /activerecord/test
parent5431e17733366da1fd10f2cd3039d66a56012683 (diff)
parent4694fcf4133a74bb0689e4888e73aa2f605394f7 (diff)
downloadrails-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.rb4
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