Permalink
Browse files

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

…the table's columns.
  • Loading branch information...
1 parent 2fcafee commit 48783ee7fc9eaf2ae19f74f103fbdeb8bad93f58 @Empact Empact committed May 10, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 activerecord/test/cases/calculations_test.rb
View
5 activerecord/test/cases/calculations_test.rb
@@ -479,6 +479,11 @@ def test_pluck
assert_equal [1,2,3,4], Topic.order(:id).pluck(:id)
end
+ def test_pluck_without_column_names
+ assert_equal [[1, "Firm", 1, nil, "37signals", nil, 1, nil, ""]],
+ Company.order(:id).limit(1).pluck
+ end
+
def test_pluck_type_cast
topic = topics(:first)
relation = Topic.where(:id => topic.id)

0 comments on commit 48783ee

Please sign in to comment.