aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation/mutation_test.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-07-09 04:20:54 +0930
committerMatthew Draper <matthew@trebex.net>2017-07-09 04:29:28 +0930
commitb83852e6eed5789b23b13bac40228e87e8822b4d (patch)
tree997f6afc67fa678d33fdb6495bc9a92cf1fc0846 /activerecord/test/cases/relation/mutation_test.rb
parente5bcc7b53cb87643e8cdbf000fea0a03bfcd34f6 (diff)
parent6658e3746b236f84e27e711fced6a83b187ad2b1 (diff)
downloadrails-b83852e6eed5789b23b13bac40228e87e8822b4d.tar.gz
rails-b83852e6eed5789b23b13bac40228e87e8822b4d.tar.bz2
rails-b83852e6eed5789b23b13bac40228e87e8822b4d.zip
Merge pull request #28867 from eugeneius/skip_query_cache_in_batches
Skip query cache for in_batches and friends
Diffstat (limited to 'activerecord/test/cases/relation/mutation_test.rb')
-rw-r--r--activerecord/test/cases/relation/mutation_test.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/test/cases/relation/mutation_test.rb b/activerecord/test/cases/relation/mutation_test.rb
index dea787c07f..8e73baa70a 100644
--- a/activerecord/test/cases/relation/mutation_test.rb
+++ b/activerecord/test/cases/relation/mutation_test.rb
@@ -90,7 +90,7 @@ module ActiveRecord
assert_equal [], relation.extending_values
end
- (Relation::SINGLE_VALUE_METHODS - [:lock, :reordering, :reverse_order, :create_with]).each do |method|
+ (Relation::SINGLE_VALUE_METHODS - [:lock, :reordering, :reverse_order, :create_with, :skip_query_cache]).each do |method|
test "##{method}!" do
assert relation.public_send("#{method}!", :foo).equal?(relation)
assert_equal :foo, relation.public_send("#{method}_value")
@@ -162,5 +162,10 @@ module ActiveRecord
relation.distinct! :foo
assert_equal :foo, relation.distinct_value
end
+
+ test "skip_query_cache!" do
+ relation.skip_query_cache!
+ assert relation.skip_query_cache_value
+ end
end
end