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

Fix issue with regression in integration tests when providing as: :html #50375

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mguan2020
Copy link
Contributor

@mguan2020 mguan2020 commented Dec 17, 2023

Motivation / Background

This Pull Request has been created in order to fix issue #50345.

Detail

This Pull Request solves the problem in Rails 7.1 where providing as: :html in the integration test for ActionDispatch causes a "undefined method to_html" error to be thrown.

To solve this issue, this Pull Request registers a param_encoder in addition to a HTML encoder in order to perform the request to the controller.

As a result, both the new tests provided in content_type_test.rb as well as the original tests for ActionDispatch are working.

Additional information

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

@seanpdoyle
Copy link
Contributor

I think the fix requires more changes than what's proposed in this diff. I've opened #50390 as an alternative resolution to the issue.

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.

None yet

2 participants