aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-07-13 16:58:57 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-07-13 16:58:57 -0700
commitd08fee3f284e6cc2a6d825603b74daf8ab0ba09f (patch)
tree3ff860fd9035e04819bd27c510b66c736fd74bf0 /activerecord/test/cases
parent0736e169dc095ee8d83eafdfab7833d616ba49fb (diff)
downloadrails-d08fee3f284e6cc2a6d825603b74daf8ab0ba09f.tar.gz
rails-d08fee3f284e6cc2a6d825603b74daf8ab0ba09f.tar.bz2
rails-d08fee3f284e6cc2a6d825603b74daf8ab0ba09f.zip
teaching the mysql adapter how to typecast strings returned from the database
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/calculations_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index e1c1e449ef..43c034703d 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -433,7 +433,7 @@ class CalculationsTest < ActiveRecord::TestCase
Company.create!(:name => "test", :contracts => [Contract.new(:developer_id => 7)])
# TODO: Investigate why PG isn't being typecast
- if current_adapter?(:PostgreSQLAdapter)
+ if current_adapter?(:PostgreSQLAdapter) || current_adapter?(:MysqlAdapter)
assert_equal "7", Company.includes(:contracts).maximum(:developer_id)
else
assert_equal 7, Company.includes(:contracts).maximum(:developer_id)
@@ -444,7 +444,7 @@ class CalculationsTest < ActiveRecord::TestCase
Company.create!(:name => "test", :contracts => [Contract.new(:developer_id => 7)])
# TODO: Investigate why PG isn't being typecast
- if current_adapter?(:PostgreSQLAdapter)
+ if current_adapter?(:PostgreSQLAdapter) || current_adapter?(:MysqlAdapter)
assert_equal "7", Company.includes(:contracts).minimum(:developer_id)
else
assert_equal 7, Company.includes(:contracts).minimum(:developer_id)