aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-04-13 07:56:17 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-04-13 07:56:17 +0900
commit58d52171bb8c7a5589bb13ce1bab81d635ae9cf0 (patch)
tree3e71eb1e93fd09aeef86eb4893b5c92f3a81d718 /activerecord/test/cases
parentfaca40dfd4032bbe2373210255eb7aa1c6527503 (diff)
downloadrails-58d52171bb8c7a5589bb13ce1bab81d635ae9cf0.tar.gz
rails-58d52171bb8c7a5589bb13ce1bab81d635ae9cf0.tar.bz2
rails-58d52171bb8c7a5589bb13ce1bab81d635ae9cf0.zip
Add a test case for #20802
The issue #20802 has been fixed in cc0b566. Closes #20802.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/relation/where_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/where_test.rb b/activerecord/test/cases/relation/where_test.rb
index c7b2ac90fb..cbc466d6b8 100644
--- a/activerecord/test/cases/relation/where_test.rb
+++ b/activerecord/test/cases/relation/where_test.rb
@@ -289,6 +289,11 @@ module ActiveRecord
assert_equal essays(:david_modest_proposal), essay
end
+ def test_where_on_association_with_select_relation
+ essay = Essay.where(author: Author.where(name: "David").select(:name)).take
+ assert_equal essays(:david_modest_proposal), essay
+ end
+
def test_where_with_strong_parameters
protected_params = Class.new do
attr_reader :permitted