Skip to content

Support Rails' parsed_body #140

@tagliala

Description

@tagliala

Hi, this enhancement can also be considered as an issue

There is a new RuboCop Rails cop that checks for the usage of parsed_body rubocop/rubocop-rails#863

Ref: https://api.rubyonrails.org/classes/ActionDispatch/TestResponse.html#method-i-parsed_body

I've noticed that out of the box JSON API does not convert parsed_body into a Hash

Compatibility has been added in Rails 6.0 via rails/rails#34717

Expected

response.parsed_body.class
Hash

Actual

response.parsed_body.class
String

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions