diff options
author | Jake Worth <jakeworth82@gmail.com> | 2015-10-12 23:28:26 -0500 |
---|---|---|
committer | Jake Worth <jakeworth82@gmail.com> | 2015-10-16 09:23:15 -0500 |
commit | 7663376f0708118694874c2670f0053c4143bc3f (patch) | |
tree | 4131033fa034e039075c73bfa80d1115a11ea2fe /activerecord/test | |
parent | b3656076d64fabb7a492aa4b8e8d45b6826b8798 (diff) | |
download | rails-7663376f0708118694874c2670f0053c4143bc3f.tar.gz rails-7663376f0708118694874c2670f0053c4143bc3f.tar.bz2 rails-7663376f0708118694874c2670f0053c4143bc3f.zip |
`where` raises ArgumentError on unsupported types.
[#20473]
Diffstat (limited to 'activerecord/test')
-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 c3a1471205..399a4dbbf1 100644 --- a/activerecord/test/cases/relation/where_test.rb +++ b/activerecord/test/cases/relation/where_test.rb @@ -302,5 +302,11 @@ module ActiveRecord assert_raises(ActiveModel::ForbiddenAttributesError) { Author.where(params) } assert_equal author, Author.where(params.permit!).first end + + def test_where_with_unsupported_arguments + author = authors(:david) + + assert_raises(ArgumentError) { Author.where(42) } + end end end |