diff options
author | Adam Panzer <apanzerj@gmail.com> | 2014-06-10 10:53:48 -0700 |
---|---|---|
committer | Adam Panzer <apanzerj@gmail.com> | 2014-06-10 10:53:48 -0700 |
commit | 9010274627a538c688e44737e7a50c659da7e863 (patch) | |
tree | 98e86aa8c8612b3b7ff3bd5bed47032b60f7ed7b /activesupport/test | |
parent | 3681e1ac2c5448b9826f2e3c9b6508c50d2b4f17 (diff) | |
download | rails-9010274627a538c688e44737e7a50c659da7e863.tar.gz rails-9010274627a538c688e44737e7a50c659da7e863.tar.bz2 rails-9010274627a538c688e44737e7a50c659da7e863.zip |
fix error with long keys in ActiveSupport::Cache::FileStore
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/caching_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb index 18923f61d1..d55cc5d3b0 100644 --- a/activesupport/test/caching_test.rb +++ b/activesupport/test/caching_test.rb @@ -692,6 +692,11 @@ class FileStoreTest < ActiveSupport::TestCase assert File.exist?(filepath) end + def test_long_keys + @cache.write("a"*10000, 1) + assert_equal 1, @cache.read("a"*10000) + end + def test_key_transformation key = @cache.send(:key_file_path, "views/index?id=1") assert_equal "views/index?id=1", @cache.send(:file_path_key, key) |