diff options
author | Arthur Nogueira Neves <github@arthurnn.com> | 2015-12-05 15:57:19 -0500 |
---|---|---|
committer | Arthur Nogueira Neves <github@arthurnn.com> | 2015-12-05 15:57:19 -0500 |
commit | edc3deb9f1035811dfa6b4fedfaa18a0654c7018 (patch) | |
tree | c3a6eb5679393738b4f5605388407b66dfea25ab /activesupport/test/caching_test.rb | |
parent | d08033f9b50bddd1bbad8818541cff0f67bcc260 (diff) | |
parent | 8c3bdb757838f86117fc83f24f8c4290d22a71d5 (diff) | |
download | rails-edc3deb9f1035811dfa6b4fedfaa18a0654c7018.tar.gz rails-edc3deb9f1035811dfa6b4fedfaa18a0654c7018.tar.bz2 rails-edc3deb9f1035811dfa6b4fedfaa18a0654c7018.zip |
Merge pull request #22202 from grosser/grosser/write-consistent
even if a write fails, store the raw value
Diffstat (limited to 'activesupport/test/caching_test.rb')
-rw-r--r-- | activesupport/test/caching_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index 7bef73136c..a1bd2d5356 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -655,6 +655,14 @@ module LocalCacheBehavior end end + def test_local_cache_of_read_nil + @cache.with_local_cache do + assert_equal nil, @cache.read('foo') + @cache.send(:bypass_local_cache) { @cache.write 'foo', 'bar' } + assert_equal nil, @cache.read('foo') + end + end + def test_local_cache_of_delete @cache.with_local_cache do @cache.write('foo', 'bar') |