Skip to content
This repository
Browse code

Merge pull request #4947 from rafaelfranca/fix-build

PostgreSQL does not work in the same way of the other adapters
  • Loading branch information...
commit 828d29c374203d50f2547060ee9e580a6dd80e8c 2 parents 06b9c90 + 78a6b6a
Aaron Patterson authored February 08, 2012
10  activerecord/test/cases/calculations_test.rb
@@ -485,8 +485,12 @@ def test_pluck_auto_table_name_prefix
485 485
   end
486 486
 
487 487
   def test_pluck_not_auto_table_name_prefix_if_column_joined
488  
-    c = Company.create!(:name => "test", :contracts => [Contract.new(:developer_id => 7)])
489  
-    # No chance for typecast here
490  
-    assert_equal ["7"], Company.joins(:contracts).pluck(:developer_id)
  488
+    Company.create!(:name => "test", :contracts => [Contract.new(:developer_id => 7)])
  489
+    # FIXME: PostgreSQL should works in the same way of the other adapters
  490
+    if current_adapter?(:PostgreSQLAdapter)
  491
+      assert_equal ["7"], Company.joins(:contracts).pluck(:developer_id)
  492
+    else
  493
+      assert_equal [7], Company.joins(:contracts).pluck(:developer_id)
  494
+    end
491 495
   end
492 496
 end

0 notes on commit 828d29c

Please sign in to comment.
Something went wrong with that request. Please try again.