aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2012-06-28 21:55:28 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2012-08-17 22:22:55 -0500
commitbd680e3f5fc863318cff3d2c109db5a6cc822579 (patch)
treebe5eab371d7b419f689f6573fcac0586d582c2f8 /activesupport/test
parent82663306f428a5bbc90c511458432afb26d2f238 (diff)
downloadrails-bd680e3f5fc863318cff3d2c109db5a6cc822579.tar.gz
rails-bd680e3f5fc863318cff3d2c109db5a6cc822579.tar.bz2
rails-bd680e3f5fc863318cff3d2c109db5a6cc822579.zip
Add test to cover increment/decrement of non-existing key in MemCacheStore
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/caching_test.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index 36efa73e62..5056d8deb8 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -447,6 +447,7 @@ module CacheIncrementDecrementBehavior
assert_equal 2, @cache.read('foo').to_i
assert_equal 3, @cache.increment('foo')
assert_equal 3, @cache.read('foo').to_i
+ assert_nil @cache.increment('bar')
end
def test_decrement
@@ -456,6 +457,7 @@ module CacheIncrementDecrementBehavior
assert_equal 2, @cache.read('foo').to_i
assert_equal 1, @cache.decrement('foo')
assert_equal 1, @cache.read('foo').to_i
+ assert_nil @cache.decrement('bar')
end
end