From fec4c5ad76a4955364e091296b68bb7ac12bc928 Mon Sep 17 00:00:00 2001 From: Brian Durand Date: Mon, 1 Aug 2011 12:05:29 -0500 Subject: Pass options in ActiveSupport::Cache::CacheStore#read_multi through to the delete_entry call. --- activesupport/test/caching_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activesupport/test') diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index 402c6695aa..5e6a2102e0 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -199,6 +199,14 @@ module CacheStoreBehavior @cache.write('fud', 'biz') assert_equal({"foo" => "bar", "fu" => "baz"}, @cache.read_multi('foo', 'fu')) end + + def test_read_multi_with_expires + @cache.write('foo', 'bar', :expires_in => 0.001) + @cache.write('fu', 'baz') + @cache.write('fud', 'biz') + sleep(0.002) + assert_equal({"fu" => "baz"}, @cache.read_multi('foo', 'fu')) + end def test_read_and_write_compressed_small_data @cache.write('foo', 'bar', :compress => true) -- cgit v1.2.3