diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-06-12 14:25:27 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-06-12 14:25:27 -0700 |
commit | 10cdbbc56bf31da3a2e030dfe9d399507348f54e (patch) | |
tree | c1e1b4371a1dd2a10460fcc503980ffb86d46f14 /activerecord/test/cases | |
parent | 5dd2cfc8b4a89ec6321ebbb0e81cd50d58785b6f (diff) | |
parent | 8381d398cedf3e95fb073b8110d80f636cff449c (diff) | |
download | rails-10cdbbc56bf31da3a2e030dfe9d399507348f54e.tar.gz rails-10cdbbc56bf31da3a2e030dfe9d399507348f54e.tar.bz2 rails-10cdbbc56bf31da3a2e030dfe9d399507348f54e.zip |
Merge branch '3-2-stable-rel' into 3-2-stable
* 3-2-stable-rel:
updating changelogs
bumping version numbers
updating changelogs with security fixes
updating changelogs
Array parameters should not contain nil values.
Additional fix for CVE-2012-2661
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/relation/where_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/where_test.rb b/activerecord/test/cases/relation/where_test.rb index 90c690e266..b9eef1d32f 100644 --- a/activerecord/test/cases/relation/where_test.rb +++ b/activerecord/test/cases/relation/where_test.rb @@ -11,6 +11,12 @@ module ActiveRecord end end + def test_where_error_with_hash + assert_raises(ActiveRecord::StatementInvalid) do + Post.where(:id => { :posts => {:author_id => 10} }).first + end + end + def test_where_with_table_name post = Post.first assert_equal post, Post.where(:posts => { 'id' => post.id }).first |