mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
87b3e226d6
This reverts commit3420a14590
, reversing changes made toafb66a5a59
.
21 lines
492 B
Ruby
21 lines
492 B
Ruby
require "abstract_unit"
|
|
require "action_dispatch/http/rack_cache"
|
|
|
|
class RackCacheMetaStoreTest < ActiveSupport::TestCase
|
|
class ReadWriteHash < ::Hash
|
|
alias :read :[]
|
|
alias :write :[]=
|
|
end
|
|
|
|
setup do
|
|
@store = ActionDispatch::RailsMetaStore.new(ReadWriteHash.new)
|
|
end
|
|
|
|
test "stuff is deep duped" do
|
|
@store.write(:foo, bar: :original)
|
|
hash = @store.read(:foo)
|
|
hash[:bar] = :changed
|
|
hash = @store.read(:foo)
|
|
assert_equal :original, hash[:bar]
|
|
end
|
|
end
|