From 83c1ed9a1a11196cab66d9c44a56a902ca0710e4 Mon Sep 17 00:00:00 2001 From: fatkodima Date: Mon, 5 Feb 2018 17:22:18 +0200 Subject: Use Redis#mget for RedisCacheStore#fetch_multi --- activesupport/test/cache/stores/redis_cache_store_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activesupport/test/cache') diff --git a/activesupport/test/cache/stores/redis_cache_store_test.rb b/activesupport/test/cache/stores/redis_cache_store_test.rb index 22b519daf1..9daa0b8796 100644 --- a/activesupport/test/cache/stores/redis_cache_store_test.rb +++ b/activesupport/test/cache/stores/redis_cache_store_test.rb @@ -109,6 +109,14 @@ module ActiveSupport::Cache::RedisCacheStoreTests include CacheIncrementDecrementBehavior include CacheInstrumentationBehavior include AutoloadingCacheBehavior + + def test_fetch_multi_uses_redis_mget + assert_called(@cache.redis, :mget, returns: []) do + @cache.fetch_multi("a", "b", "c") do |key| + key * 2 + end + end + end end # Separate test class so we can omit the namespace which causes expected, -- cgit v1.2.3