Skip to content

Commit

Permalink
Fix cache_write_multi_test to support normalized_hash in Rails edge (#…
Browse files Browse the repository at this point in the history
…153)

Thanks to rails/rails#52723, the
instrumentations for Active Support cache always provides `key` with
String keys. So, I changed tests to always convert `key`'s keys symbols
to always assert the same way between multiple Rails versions.
  • Loading branch information
yykamei authored Sep 8, 2024
1 parent 9e8d858 commit 7eb8838
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class CacheWriteMultiTest < ActionDispatch::IntegrationTest
test 'returns key' do
get '/users/123/cache3'

assert_equal({ w1: 1, w2: 2 }, @event.key)
assert_equal({ w1: 1, w2: 2 }, @event.key.transform_keys(&:to_sym))
end

if Gem::Version.new(Rails.version) >= Gem::Version.new('6.1')
Expand Down

0 comments on commit 7eb8838

Please sign in to comment.