diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-07-06 07:07:46 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-07-06 18:15:31 -0300 |
commit | 7adc4f20cc78f1150640bdc0a60832b3752244dc (patch) | |
tree | 5561ae88e096c6781944e48773d5214e82341d94 /activerecord/test/cases | |
parent | 03dcdc317de7e63632da685255ca8b7f91bf5522 (diff) | |
download | rails-7adc4f20cc78f1150640bdc0a60832b3752244dc.tar.gz rails-7adc4f20cc78f1150640bdc0a60832b3752244dc.tar.bz2 rails-7adc4f20cc78f1150640bdc0a60832b3752244dc.zip |
Merge pull request #6985 from sidonath/disable-query-cache-for-locks
Disable query cache for lock queries
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/query_cache_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb index 9554386dcf..da9dcf2440 100644 --- a/activerecord/test/cases/query_cache_test.rb +++ b/activerecord/test/cases/query_cache_test.rb @@ -165,6 +165,14 @@ class QueryCacheTest < ActiveRecord::TestCase end end end + + def test_cache_is_ignored_for_locked_relations + task = Task.find 1 + + Task.cache do + assert_queries(2) { task.lock!; task.lock! } + end + end end class QueryCacheExpiryTest < ActiveRecord::TestCase |