aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/cache
diff options
context:
space:
mode:
authorfatkodima <fatkodima123@gmail.com>2018-02-05 17:22:18 +0200
committerJeremy Daer <jeremydaer@gmail.com>2018-02-05 13:51:55 -0800
commit83c1ed9a1a11196cab66d9c44a56a902ca0710e4 (patch)
treede096edb06212fed0a0efe83b167039bb60070bc /activesupport/test/cache
parent3b5d940fe5868af0f31989054e8fb7d2d9d11ec9 (diff)
downloadrails-83c1ed9a1a11196cab66d9c44a56a902ca0710e4.tar.gz
rails-83c1ed9a1a11196cab66d9c44a56a902ca0710e4.tar.bz2
rails-83c1ed9a1a11196cab66d9c44a56a902ca0710e4.zip
Use Redis#mget for RedisCacheStore#fetch_multi
Diffstat (limited to 'activesupport/test/cache')
-rw-r--r--activesupport/test/cache/stores/redis_cache_store_test.rb8
1 files changed, 8 insertions, 0 deletions
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,