Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

mysql adapter also fails with a number bigger than int

  • Loading branch information...
commit d50f75367bbd1baf52a8c9c246e7b27d6d9addff 1 parent a1ad848
@rafaelfranca rafaelfranca authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 activerecord/test/cases/finder_test.rb
View
7 activerecord/test/cases/finder_test.rb
@@ -62,16 +62,19 @@ def test_exists
end
def test_exists_fails_when_parameter_has_invalid_type
- if current_adapter?(:PostgreSQLAdapter)
+ if current_adapter?(:PostgreSQLAdapter, :MysqlAdapter)
assert_raises ActiveRecord::StatementInvalid do
Topic.exists?(("9"*53).to_i) # number that's bigger than int
end
+ else
+ assert_equal false, Topic.exists?(("9"*53).to_i) # number that's bigger than int
+ end
+ if current_adapter?(:PostgreSQLAdapter)
assert_raises ActiveRecord::StatementInvalid do
Topic.exists?("foo")
end
else
- assert_equal false, Topic.exists?(("9"*53).to_i) # number that's bigger than int
assert_equal false, Topic.exists?("foo")
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.