aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/caching_test.rb
diff options
context:
space:
mode:
authorSebi Burkhard <sebi.burkhard@gmail.com>2011-07-08 18:08:37 +0700
committerSebi Burkhard <sebi.burkhard@gmail.com>2011-07-08 18:08:37 +0700
commit9e63f9f2e42a3cbfd7b36e47ee5a7c94da757152 (patch)
treebd32bbda00d45bebf6d533ba1d96f9c8948fc7dd /activesupport/test/caching_test.rb
parentad912c08a91b90f6a7b30ae75b4a3a5f6c513bd4 (diff)
downloadrails-9e63f9f2e42a3cbfd7b36e47ee5a7c94da757152.tar.gz
rails-9e63f9f2e42a3cbfd7b36e47ee5a7c94da757152.tar.bz2
rails-9e63f9f2e42a3cbfd7b36e47ee5a7c94da757152.zip
Properly cache value when it is "false"
Diffstat (limited to 'activesupport/test/caching_test.rb')
-rw-r--r--activesupport/test/caching_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index ed5ccb44de..498127e5bc 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -188,6 +188,11 @@ module CacheStoreBehavior
assert_equal nil, @cache.read('foo')
end
+ def test_should_read_and_write_false
+ assert_equal true, @cache.write('foo', false)
+ assert_equal false, @cache.read('foo')
+ end
+
def test_read_multi
@cache.write('foo', 'bar')
@cache.write('fu', 'baz')