Rspec: GET helper doesn't parse nested query params correctly.
gbrlmrllo opened this issue · 0 comments
gbrlmrllo commented
Checklist
- Upgrade Jets: Are you using the latest version of Jets? This allows Jets to fix issues fast. There's a
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/ - Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on https://community.rubyonjets.com
- Code sample: Have you put together a code sample to reproduce the issue and make it available? Code samples help speed up fixes dramatically. If it's an easily reproducible issue, then code samples are not needed. If you're unsure, please include a code sample.
My Environment
Software | Version |
---|---|
Operating System | OSX |
Jets | 2.3.17 |
Ruby | 2.6.6 |
Expected Behaviour
When I use the get
helper with nested query params, then, the parameters should keep the same structure that was sent in the query.
Current Behavior
Currently, when I use the get
helper with nested query params, the result obtained is that the value of every key of the params is converted to a string.
Step-by-step reproduction instructions
- Create a controller spec
- Use the
get
helper and send nested query params.
example:get '/api/v1/activities', query: { page: { number: 1, size: 10 } }
- You can look at the logs and verify how the value of every key is converted to a
string
regardless of whether it is a nestedhash
.