aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/calculations_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-02-08 16:34:29 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-02-08 16:38:31 -0200
commit78a6b6a5fd372254c7b49009fb1f573b677b634a (patch)
tree3687e205623e461891e68d0de2d63d07137cf050 /activerecord/test/cases/calculations_test.rb
parent06b9c905a9e18bb6da7cc95e53870b7493137305 (diff)
downloadrails-78a6b6a5fd372254c7b49009fb1f573b677b634a.tar.gz
rails-78a6b6a5fd372254c7b49009fb1f573b677b634a.tar.bz2
rails-78a6b6a5fd372254c7b49009fb1f573b677b634a.zip
PostgreSQL does not work in the same way of the other adapters
Diffstat (limited to 'activerecord/test/cases/calculations_test.rb')
-rw-r--r--activerecord/test/cases/calculations_test.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index 91d0af4872..e1544b3b00 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -485,8 +485,12 @@ class CalculationsTest < ActiveRecord::TestCase
end
def test_pluck_not_auto_table_name_prefix_if_column_joined
- c = Company.create!(:name => "test", :contracts => [Contract.new(:developer_id => 7)])
- # No chance for typecast here
- assert_equal ["7"], Company.joins(:contracts).pluck(:developer_id)
+ Company.create!(:name => "test", :contracts => [Contract.new(:developer_id => 7)])
+ # FIXME: PostgreSQL should works in the same way of the other adapters
+ if current_adapter?(:PostgreSQLAdapter)
+ assert_equal ["7"], Company.joins(:contracts).pluck(:developer_id)
+ else
+ assert_equal [7], Company.joins(:contracts).pluck(:developer_id)
+ end
end
end