Permalink
Browse files

Add test to cover increment/decrement of non-existing key in MemCache…

…Store
  • Loading branch information...
1 parent 8266330 commit bd680e3f5fc863318cff3d2c109db5a6cc822579 @guilleiguaran guilleiguaran committed Jun 29, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 activesupport/test/caching_test.rb
@@ -447,6 +447,7 @@ def test_increment
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 @@ def test_decrement
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

0 comments on commit bd680e3

Please sign in to comment.