aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/calculations_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-05-10 07:06:50 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-05-10 07:06:50 -0700
commit3589181122f1a70abc1acd8c6bf41b46e2be2f5a (patch)
treee2c75c57db9bfce2524df641cba63aa268c8fb0c /activerecord/test/cases/calculations_test.rb
parent84c69a165380d4ae92322d4503a5b9a7201f6369 (diff)
parentde5b89ddc9f9f45760856a1eb55f53a11d067a74 (diff)
downloadrails-3589181122f1a70abc1acd8c6bf41b46e2be2f5a.tar.gz
rails-3589181122f1a70abc1acd8c6bf41b46e2be2f5a.tar.bz2
rails-3589181122f1a70abc1acd8c6bf41b46e2be2f5a.zip
Merge pull request #10552 from arunagw/pluck-fixed-3-2-stable
Pluck fixed 3 2 stable
Diffstat (limited to 'activerecord/test/cases/calculations_test.rb')
-rw-r--r--activerecord/test/cases/calculations_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index b9050c750f..8755e1f580 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -494,8 +494,9 @@ class CalculationsTest < ActiveRecord::TestCase
end
def test_pluck_does_not_replace_select_clause
- taks_relation = Topic.select("approved, id, id AS foo_id").order(:foo_id)
- assert_equal [false, true, true, true], taks_relation.pluck(:approved)
+ taks_relation = Topic.select("approved, id, id AS foo_id").order('foo_id DESC')
+ assert_equal [4,3,2,1], taks_relation.pluck(:id)
+ assert_equal [true, true, true, false], taks_relation.pluck(:approved)
end
def test_pluck_auto_table_name_prefix