Skip to content
This repository
Browse code

Add coverage for the fact that pluck without an argument returns all …

…the table's columns.
  • Loading branch information...
commit 48783ee7fc9eaf2ae19f74f103fbdeb8bad93f58 1 parent 2fcafee
Ben Woosley Empact authored

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. +5 0 activerecord/test/cases/calculations_test.rb
5 activerecord/test/cases/calculations_test.rb
@@ -479,6 +479,11 @@ def test_pluck
479 479 assert_equal [1,2,3,4], Topic.order(:id).pluck(:id)
480 480 end
481 481
  482 + def test_pluck_without_column_names
  483 + assert_equal [[1, "Firm", 1, nil, "37signals", nil, 1, nil, ""]],
  484 + Company.order(:id).limit(1).pluck
  485 + end
  486 +
482 487 def test_pluck_type_cast
483 488 topic = topics(:first)
484 489 relation = Topic.where(:id => topic.id)

0 comments on commit 48783ee

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