diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-04-19 18:02:11 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2018-04-19 18:02:24 -0400 |
commit | daffe03308bffc43ea343a886aab33082d83bb9c (patch) | |
tree | 1ce087c70896ff8859d2659744387e4f45e8fa23 /activerecord/test/cases | |
parent | d26f48a57453844ad81503fe71ba24a1d2a1a1b7 (diff) | |
parent | 28ef2de2292695815eace5f2645fe4e305768403 (diff) | |
download | rails-daffe03308bffc43ea343a886aab33082d83bb9c.tar.gz rails-daffe03308bffc43ea343a886aab33082d83bb9c.tar.bz2 rails-daffe03308bffc43ea343a886aab33082d83bb9c.zip |
Merge pull request #32645 from maneframe/skip_query_cache_merge
Fix relation merging with skip_query_cache!
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/relation/merging_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/merging_test.rb b/activerecord/test/cases/relation/merging_test.rb index 074ce9454f..f53ef1fe35 100644 --- a/activerecord/test/cases/relation/merging_test.rb +++ b/activerecord/test/cases/relation/merging_test.rb @@ -78,6 +78,10 @@ class RelationMergingTest < ActiveRecord::TestCase assert_equal 1, comments.count end + def test_relation_merging_with_skip_query_cache + assert_equal Post.all.merge(Post.all.skip_query_cache!).skip_query_cache_value, true + end + def test_relation_merging_with_association assert_queries(2) do # one for loading post, and another one merged query post = Post.where(body: "Such a lovely day").first |