Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Fixing the default headers has broken non JSON tests #13

Open
simmogs opened this issue Aug 29, 2013 · 2 comments
Open

Fixing the default headers has broken non JSON tests #13

simmogs opened this issue Aug 29, 2013 · 2 comments
Labels

Comments

@simmogs
Copy link

simmogs commented Aug 29, 2013

I'm using Rails 4 and Ruby 2.0. The change to setting default headers breaks all my none JSON tests. My Rails app has some HTML pages as well. The error I get is:

ActionController::UnknownFormat (ActionController::UnknownFormat)
./features/step_definitions/user_steps.rb:42:in `sign_in'
./features/step_definitions/user_steps.rb:74:in `/^I sign in with valid credentials$/'
features/users/sign_in.feature:22:in `When I sign in with valid credentials'

I used Rails composer to create the basic framework so the tests are their defaults.

If I revert to the latest published gem (1.2.0) everything is ok again.

@rposborne
Copy link
Contributor

It appears 1.2.1 includes this reasonably substantial behavior change that injects the vnd+ request header in all incoming requests, unless a version is already specified. This is where the behavior change occurred 6a8a6dc, I think this should be unless .blank? so it only defaults when no accept is passed.

I think this is a pretty substantial behavior change to only be a patch release and it might be just a smell as this modifies ALL incoming requests regardless if it's directed at an API controller or not.

@pmackay
Copy link

pmackay commented Aug 7, 2018

I think this broke with this change a73cbad. I've just tried this gem on a project and hit this issue. Seems to work OK by dropping back to v1.2.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants