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

Modifies mime-registration test not to interfere with real mime types #25123

Merged
merged 1 commit into from Jun 28, 2016

Conversation

bf4
Copy link
Contributor

@bf4 bf4 commented May 23, 2016

The tests introduced in
https://github.com/rails/rails/pull/23816/files#diff-384a5a15d8d53de799fb6541688ea5f9R153
register the JSON API media type application/vnd.api+json with Mime[:json].

The JSON API media type should not be registered with Mime[:json], as discussed in #23712.
Moreover, since the actual mime type used in the test is incidental, I've changed this to a valid, but fictional applcation/vnd.rails+json.

These tests were causing failures in #25050 (comment) where Mime[:jsonapi] is being added, so that JSON API request params are parsed with the JSONAPI gem.

The tests introduced in
https://github.com/rails/rails/pull/23816/files#diff-384a5a15d8d53de799fb6541688ea5f9R153
register the JSON API media type `application/vnd.api+json` with
`Mime[:json]`. The JSON API media type should not be registered
with `Mime[:json]`, as discussed in rails#23712.  Moreover,
since the actual mime type used in the test is
incidental, I've changed this to a valid, but fictional
`applcation/vnd.rails+json`.

These tests were causing failures in
rails#25050 (comment) where
`Mime[:jsonapi]` is being added, so that JSON API request params are parsed
with the JSONAPI gem.
@rails-bot
Copy link

r? @matthewd

(@rails-bot has picked a reviewer for you, use r? to override)

@bf4 bf4 changed the title Extract notes from files in binary Modifies mime-registration test not to interfere with real mime types May 23, 2016
@beauby
Copy link

beauby commented May 23, 2016

Those two tests should probably be removed altogether, as unregistering and then re-registering the JSON MIME type will cause that test to fail (if the former are run before the latter). Or the latter should be modified not to take the order into account.

@rafaelfranca
Copy link
Member

We should modify the latter to not take into account the order of the mime types.

@bf4
Copy link
Contributor Author

bf4 commented May 25, 2016

@rafaelfranca any blocker to merging this?

@bf4
Copy link
Contributor Author

bf4 commented Jun 20, 2016

@rafaelfranca any chance this will be in 5.0.0?

@kaspth
Copy link
Contributor

kaspth commented Jun 20, 2016

@bf4 please don't make these requests on PRs. It hasn't been merged, so you know the answer to your question already. Thanks! ❤️

@bf4
Copy link
Contributor Author

bf4 commented Jun 20, 2016

Hard to know how to manage stale complete prs in Rails land. Maintainers burden is so great, I dont know if things are forgotten or on hold. Is a reasonable question in smaller projects, I think. Thanks @kaspth for your conment ❤️

@kaspth
Copy link
Contributor

kaspth commented Jun 20, 2016

Yeah, I hear you. Though rest assured, @rafaelfranca does not simply forget a PR 😄

Usually it's tough for us to communicate the PR state because then we'd have to comment on a lot of PRs, which is more work. Thanks for your understanding, Benjamin. I and the rest of the team appreciate that ❤️

@rafaelfranca rafaelfranca merged commit 13a5cc3 into rails:master Jun 28, 2016
@rafaelfranca
Copy link
Member

Backported in b1115d3

rafaelfranca added a commit that referenced this pull request Jun 28, 2016
Modifies mime-registration test not to interfere with real mime types
@bf4 bf4 deleted the remove_problematic_mime_test branch July 6, 2016 01:11
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

7 participants