aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/calculations_test.rb
diff options
context:
space:
mode:
authorGannon McGibbon <gannon.mcgibbon@gmail.com>2018-12-05 10:52:17 -0500
committerGannon McGibbon <gannon.mcgibbon@gmail.com>2018-12-05 11:56:14 -0500
commit93f19071ad9d337a9f6f2fc9278c33e05597951d (patch)
treec946655109e3014b9fd5517fae6af54c32af5c64 /activerecord/test/cases/calculations_test.rb
parentd76d8f71c500f7076e1dc5801a222c8bd18466be (diff)
downloadrails-93f19071ad9d337a9f6f2fc9278c33e05597951d.tar.gz
rails-93f19071ad9d337a9f6f2fc9278c33e05597951d.tar.bz2
rails-93f19071ad9d337a9f6f2fc9278c33e05597951d.zip
Fix join table column quoting with SQLite.
Diffstat (limited to 'activerecord/test/cases/calculations_test.rb')
-rw-r--r--activerecord/test/cases/calculations_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/calculations_test.rb b/activerecord/test/cases/calculations_test.rb
index 4cb0dc66ed..4d3db912c5 100644
--- a/activerecord/test/cases/calculations_test.rb
+++ b/activerecord/test/cases/calculations_test.rb
@@ -721,6 +721,10 @@ class CalculationsTest < ActiveRecord::TestCase
assert_equal [], Topic.includes(:replies).order(:id).offset(5).pluck(:id)
end
+ def test_pluck_with_join
+ assert_equal [[2, 2], [4, 4]], Reply.includes(:topic).pluck(:id, :"topics.id")
+ end
+
def test_group_by_with_limit
expected = { "Post" => 8, "SpecialPost" => 1 }
actual = Post.includes(:comments).group(:type).order(:type).limit(2).count("comments.id")