From 9010274627a538c688e44737e7a50c659da7e863 Mon Sep 17 00:00:00 2001 From: Adam Panzer Date: Tue, 10 Jun 2014 10:53:48 -0700 Subject: fix error with long keys in ActiveSupport::Cache::FileStore --- activesupport/test/caching_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activesupport/test/caching_test.rb') 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) -- cgit v1.2.3