diff options
Diffstat (limited to 'activerecord/test/finder_test.rb')
-rw-r--r-- | activerecord/test/finder_test.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index 0c7a519bbb..13cac2ac22 100644 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -28,7 +28,15 @@ class FinderTest < Test::Unit::TestCase assert Topic.exists?(:author_name => "Mary", :approved => true) assert Topic.exists?(["parent_id = ?", 1]) assert !Topic.exists?(45) - assert !Topic.exists?("foo") + + begin + assert !Topic.exists?("foo") + rescue ActiveRecord::StatementInvalid + # PostgreSQL complains about string comparison with integer field + rescue Exception + flunk + end + assert_raise(NoMethodError) { Topic.exists?([1,2]) } end |