1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add coverage for the fact that pluck without an argument returns all the table's columns.

This commit is contained in:
Ben Woosley 2013-05-10 19:33:24 +02:00
parent 2fcafee250
commit 48783ee7fc

View file

@ -479,6 +479,11 @@ class CalculationsTest < ActiveRecord::TestCase
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)