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

DELETE endpoint returned value not formatted and results in 204 #1578

Closed
ericproulx opened this issue Feb 19, 2017 · 0 comments
Closed

DELETE endpoint returned value not formatted and results in 204 #1578

ericproulx opened this issue Feb 19, 2017 · 0 comments

Comments

@ericproulx
Copy link
Contributor

Hi,

Grape 0.19.1

The return value of a DELETE endpoint is not considered has @body.present?. Therefore, the response isn't formatted has expected and it returns a 204. Is it normal ?

The following spec fails :

describe 'delete 200, with return value has body' do
      it 'responds to /example' do
        subject.send(:delete, '/example') do
          'deleted'
        end
        send(:delete, '/example')
        expect(last_response.status).to eql 200
        expect(last_response.body).not_to be_empty
      end
    end

Thanks

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

No branches or pull requests

1 participant