aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-01-28 21:20:46 -0600
committerJoshua Peek <josh@joshpeek.com>2009-01-28 21:20:46 -0600
commit2e69db18ce2815c25eee64fc2978e7f6b57f6e1f (patch)
tree1acecec2f34325ebf5e2b839e8a6d0095c8f5ef1 /activesupport/test
parenta1a9889b06faf5e994fc29d462c7063b5ff37a3a (diff)
downloadrails-2e69db18ce2815c25eee64fc2978e7f6b57f6e1f.tar.gz
rails-2e69db18ce2815c25eee64fc2978e7f6b57f6e1f.tar.bz2
rails-2e69db18ce2815c25eee64fc2978e7f6b57f6e1f.zip
Only dup local cache values if duplicable [#1653 state:resolved]
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/caching_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index e8e0b41d4d..4e212f1661 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -81,6 +81,11 @@ module CacheStoreBehavior
assert_equal({:a => "b"}, @cache.read('foo'))
end
+ def test_should_read_and_write_integer
+ @cache.write('foo', 1)
+ assert_equal 1, @cache.read('foo')
+ end
+
def test_should_read_and_write_nil
@cache.write('foo', nil)
assert_equal nil, @cache.read('foo')
@@ -200,6 +205,13 @@ uses_memcached 'memcached backed store' do
end
end
+ def test_local_cache_should_read_and_write_integer
+ @cache.with_local_cache do
+ @cache.write('foo', 1)
+ assert_equal 1, @cache.read('foo')
+ end
+ end
+
def test_local_cache_of_delete
@cache.with_local_cache do
@cache.write('foo', 'bar')