mirror of https://github.com/rails/rails
Merge pull request #4947 from rafaelfranca/fix-build
PostgreSQL does not work in the same way of the other adapters
This commit is contained in:
commit
828d29c374
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue