diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2017-05-15 08:00:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-15 08:00:39 -0400 |
commit | 5bfb2875e9287c75f91e89f5e50654e5fbaa5855 (patch) | |
tree | cd25726d1aca26bb5de9cebca7c0728635e9645c /activesupport/test/caching_test.rb | |
parent | d48008f16438c2c9c9c7295f550568b82b95ef9e (diff) | |
parent | db9ae5f1e1449b09c08d55a8a3a21ff61d904bd3 (diff) | |
download | rails-5bfb2875e9287c75f91e89f5e50654e5fbaa5855.tar.gz rails-5bfb2875e9287c75f91e89f5e50654e5fbaa5855.tar.bz2 rails-5bfb2875e9287c75f91e89f5e50654e5fbaa5855.zip |
Merge pull request #29083 from eugeneius/local_cache_unless_exist
Don't cache locally if unless_exist was passed
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 c67ffe69b8..dbec684ce0 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -708,6 +708,14 @@ module LocalCacheBehavior end end + def test_local_cache_of_write_with_unless_exist + @cache.with_local_cache do + @cache.write("foo", "bar") + @cache.write("foo", "baz", unless_exist: true) + assert_equal @peek.read("foo"), @cache.read("foo") + end + end + def test_local_cache_of_delete @cache.with_local_cache do @cache.write("foo", "bar") |