Closed Altonymous closed 10 years ago
All Rails 4_0 specs pass. The other versions fail with this error:
1) Versionist::Routing#api_version Accept header version substring matches should route to the correct controller when format specified via accept header
Failure/Error: assert_equal 'application/json', response.content_type
MiniTest::Assertion:
<"application/json"> expected but was
<nil>.
# (eval):2:in `assert_equal'
# ./spec/api_routing_spec.rb:730:in `block (4 levels) in <top (required)>'
I'm not sure if that was there before my fork or not... and I'm not sure what the error is related to. I'll be happy to fix if it is related to my chances and you can give me a brief overview of what's happening.
@Altonymous That specific test that's failing asserts that when you specify both a content type AND a version in the Accept header, that it both routes to the correct place (based on the version) and returns the correct content type (i.e. that they can co-exist).
https://github.com/bploetz/versionist/blob/master/spec/api_routing_spec.rb#L726
That error you're getting suggests that your fix broke this logic. See my comment in #46 asking for more details to help nail down the issue you guys are seeing (I'm unable to reproduce this locally).
Here's a sample application that reproduces the issue.
https://github.com/Altonymous/authentication
Just run rake routes
after doing a bundle install
Looks like it's a combination of devise and versionist. Been long enough I don't remember the particulars. But hopefully this helps you reproduce it.
versionist 1.3.0 has been pushed to rubygems.org with this fix.
This should address this issue: https://github.com/bploetz/versionist/issues/46