Right now this unit test doesn't pass:
it "returns 201 with corresponding location" do
request.env['CONTENT_TYPE'] = 'application/vnd.api+json'
post :create, valid_attributes, valid_session
expect(response.status).to eq(201)
expect(response_body['data']['links']['self']).to eq(v1_concept_url(Concept.last)) # this passes
expect(response.location).to eq(v1_concept_url(Concept.last)) # not this
end
It would appear the response location header is not set?
Failure/Error: expect(response.location).to eq(v1_concept_url(Concept.last))
expected: "http://test.host/v1/concepts/730"
got: nil
(compared using ==)
The JSONAPI spec does seem to require it, though.
Right now this unit test doesn't pass:
It would appear the response location header is not set?
The JSONAPI spec does seem to require it, though.