diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-11-03 14:45:25 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-11-03 14:54:57 +0900 |
commit | 19f0f140746bfae588f145fcd89df1c8f6df3910 (patch) | |
tree | cf68ea3a89158590af474d1b66740aec452b9432 /activerecord/test | |
parent | b858c2c76cbe66b50df81372156d4b6f6e187be1 (diff) | |
download | rails-19f0f140746bfae588f145fcd89df1c8f6df3910.tar.gz rails-19f0f140746bfae588f145fcd89df1c8f6df3910.tar.bz2 rails-19f0f140746bfae588f145fcd89df1c8f6df3910.zip |
Checking boundable not only `IN` clause but also `NOT IN` clause
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/bind_parameter_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/bind_parameter_test.rb b/activerecord/test/cases/bind_parameter_test.rb index fddc2781b8..bd5f157ca1 100644 --- a/activerecord/test/cases/bind_parameter_test.rb +++ b/activerecord/test/cases/bind_parameter_test.rb @@ -36,8 +36,12 @@ if ActiveRecord::Base.connection.prepared_statements def test_too_many_binds bind_params_length = @connection.send(:bind_params_length) + topics = Topic.where(id: (1 .. bind_params_length).to_a << 2**63) assert_equal Topic.count, topics.count + + topics = Topic.where.not(id: (1 .. bind_params_length).to_a << 2**63) + assert_equal 0, topics.count end def test_bind_from_join_in_subquery |