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:
parent
2fcafee250
commit
48783ee7fc
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue