aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/caching_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/caching_test.rb')
-rw-r--r--activesupport/test/caching_test.rb8
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")