aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-12-29 17:13:47 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-01 22:28:07 -0300
commitddd0a22133e3aff87f9a966af3ddf85c41f42d2e (patch)
tree0f883355214cc4b4e00f6cc6145a69e45c05a985 /activesupport/test
parent8b07f18599854475a69c1447642dd3d80bea8df9 (diff)
downloadrails-ddd0a22133e3aff87f9a966af3ddf85c41f42d2e.tar.gz
rails-ddd0a22133e3aff87f9a966af3ddf85c41f42d2e.tar.bz2
rails-ddd0a22133e3aff87f9a966af3ddf85c41f42d2e.zip
Check by @v before converting the entry on expired?
We should convert when @v is defined not @value. The test was calling value first that already converts the entry so we are not catching this bug.
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/caching_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/test/caching_test.rb b/activesupport/test/caching_test.rb
index 5945605f7b..24cd33b8af 100644
--- a/activesupport/test/caching_test.rb
+++ b/activesupport/test/caching_test.rb
@@ -1070,7 +1070,7 @@ class CacheEntryTest < ActiveSupport::TestCase
version_4beta1_entry.instance_variable_set(:@v, "hello")
version_4beta1_entry.instance_variable_set(:@x, Time.now.to_i - 1)
entry = Marshal.load(Marshal.dump(version_4beta1_entry))
- assert_equal "hello", entry.value
assert_equal true, entry.expired?
+ assert_equal "hello", entry.value
end
end