Permalink
Browse files

PostgreSQL does not work in the same way of the other adapters

  • Loading branch information...
1 parent 06b9c90 commit 78a6b6a5fd372254c7b49009fb1f573b677b634a @rafaelfranca rafaelfranca committed Feb 8, 2012
Showing with 7 additions and 3 deletions.
  1. +7 −3 activerecord/test/cases/calculations_test.rb
@@ -485,8 +485,12 @@ def test_pluck_auto_table_name_prefix
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

0 comments on commit 78a6b6a

Please sign in to comment.