Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using parsed_body in ActionController::TestCase #34717

Merged
merged 1 commit into from
Dec 17, 2018

Conversation

tbuehlmann
Copy link
Contributor

@tbuehlmann tbuehlmann commented Dec 16, 2018

Summary

Allow using parsed_body in ActionController::TestCase by switching the initialzation of an appropriate response parser
in ActionDispatch::TestResponse from eagerly to lazily.

By doing so, the response parser can be correctly set for
ActionController::TestCase, which doesn't include
the content type header in the constructor but only sets it at
a later time.

Fixes #34676.

@rails-bot rails-bot bot added the actionpack label Dec 16, 2018
@tbuehlmann tbuehlmann changed the title Allow using parsed_body in ActionController::TestCase Allow using parsed_body in ActionController::TestCase Dec 16, 2018
… by switching the initialzation of an appropriate response parser
in `ActionDispatch::TestResponse` from eagerly to lazily.

By doing so, the response parser can be correctly set for
`ActionController::TestCase`, which doesn't include
the content type header in the constructor but only sets it at
a later time.

Fixes rails#34676.
@kaspth kaspth merged commit 048e317 into rails:master Dec 17, 2018
@kaspth
Copy link
Contributor

kaspth commented Dec 17, 2018

Thanks!

suketa added a commit to suketa/rails_sandbox that referenced this pull request Aug 12, 2019
Allow using parsed_body in ActionController::TestCase
rails/rails#34717
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants