Commit 79ef0598ecd5281920d0dd2b5f82b6567974932a
1 parent
3f692b06
Exists in
master
and in
1 other branch
Added test for pluck
Showing
1 changed file
with
6 additions
and
0 deletions
Show diff stats
test/relation_test.rb
@@ -26,4 +26,10 @@ class RelationTest < Minitest::Test | @@ -26,4 +26,10 @@ class RelationTest < Minitest::Test | ||
26 | def test_except | 26 | def test_except |
27 | assert_equal 10000, Product.search("*").limit(10).except(:limit).limit_value | 27 | assert_equal 10000, Product.search("*").limit(10).except(:limit).limit_value |
28 | end | 28 | end |
29 | + | ||
30 | + # TODO call pluck on Active Record query | ||
31 | + def test_pluck | ||
32 | + store_names ["Product A", "Product B"] | ||
33 | + assert_equal ["Product A", "Product B"], Product.search("product").pluck(:name).sort | ||
34 | + end | ||
29 | end | 35 | end |