Skip to content

Commit

Permalink
Unescape the result of Rack::Utils.build_nested_query
Browse files Browse the repository at this point in the history
  • Loading branch information
iMacTia committed Jan 20, 2024
1 parent d5e03e8 commit 66551ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/faraday/params_encoders/nested_spec.rb
Expand Up @@ -62,7 +62,8 @@
it 'encodes rack compat' do
params = { a: [{ one: '1', two: '2' }, '3', ''] }
result = Faraday::Utils.unescape(Faraday::NestedParamsEncoder.encode(params)).split('&')
expected = Rack::Utils.build_nested_query(params).split('&')
escaped = Rack::Utils.build_nested_query(params)
expected = Rack::Utils.unescape(escaped).split('&')
expect(result).to match_array(expected)
end

Expand Down

0 comments on commit 66551ec

Please sign in to comment.