diff options
Diffstat (limited to 'activerecord/test/cases/relation')
-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 |