diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-02-20 13:30:34 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-02-21 16:06:57 +0100 |
commit | ca6aba7f30ad9910f17e4c5b39667889d9518794 (patch) | |
tree | de664f87fdb131b2ea0bacb9bccbfaf79f85d7c9 /activesupport/test | |
parent | 11644fd0ceb99f3f0529323df5ad625c596b3f21 (diff) | |
download | rails-ca6aba7f30ad9910f17e4c5b39667889d9518794.tar.gz rails-ca6aba7f30ad9910f17e4c5b39667889d9518794.tar.bz2 rails-ca6aba7f30ad9910f17e4c5b39667889d9518794.zip |
Instrument read_multi.
Adds `read_multi` instrumentation formatted as:
Caches multi read:
- views/david/2/4184ab71db6849621a4d8820fcd2c0ad
- views/david/2/4184ab71db6849621a4d8820fcd2c0ad
- views/david/3/4184ab71db6849621a4d8820fcd2c0ad
- views/david/3/4184ab71db6849621a4d8820fcd2c0ad
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/caching_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index 98f3ea7a14..095e908907 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -1021,6 +1021,15 @@ class CacheStoreLoggerTest < ActiveSupport::TestCase @cache.mute { @cache.fetch('foo') { 'bar' } } assert @buffer.string.blank? end + + def test_multi_read_loggin + @cache.write 'hello', 'goodbye' + @cache.write 'world', 'earth' + + @cache.read_multi('hello', 'world') + + assert_match "Caches multi read:\n- hello\n- world", @buffer.string.tap { |l| p l } + end end class CacheEntryTest < ActiveSupport::TestCase |