diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2014-08-18 11:29:58 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2014-08-18 11:29:58 -0300 |
commit | 70749815c4a4eca14da338228ffe9b87a3f69782 (patch) | |
tree | 0d42b342d0f75272720eee8e6abc3c317a94277d /activerecord | |
parent | 6d92dcc7bd25f1533d3fc282dd4909ac8ed1a2dc (diff) | |
parent | 6fdf5167b7a49a4cdd9d47570ddcebcbbf808e99 (diff) | |
download | rails-70749815c4a4eca14da338228ffe9b87a3f69782.tar.gz rails-70749815c4a4eca14da338228ffe9b87a3f69782.tar.bz2 rails-70749815c4a4eca14da338228ffe9b87a3f69782.zip |
Merge pull request #16528 from byroot/add-test-case-for-nested-array-in-where-conditions
Add a test case of nested empty array values in conditions
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/relation/where_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/where_test.rb b/activerecord/test/cases/relation/where_test.rb index b4804aa9d7..580ea98910 100644 --- a/activerecord/test/cases/relation/where_test.rb +++ b/activerecord/test/cases/relation/where_test.rb @@ -180,6 +180,10 @@ module ActiveRecord assert_equal 0, Post.where(:id => []).count end + def test_where_with_table_name_and_nested_empty_array + assert_equal [], Post.where(:id => [[]]).to_a + end + def test_where_with_empty_hash_and_no_foreign_key assert_equal 0, Edge.where(:sink => {}).count end |