Skip to content

Commit

Permalink
Merge pull request #1326 from namusyaka/fix-1057
Browse files Browse the repository at this point in the history
Add test for OPTIONS and HEAD requests with catch-all
  • Loading branch information
dblock committed Mar 16, 2016
2 parents 1097eb1 + c81c830 commit f5d3ddc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/grape/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3046,6 +3046,12 @@ def before
get '/v2/hello'
expect(last_response.status).to eq(200)
expect(last_response.body).to eq('v2')
options '/v2/hello'
expect(last_response.status).to eq(204)
expect(last_response.body).to be_blank
head '/v2/hello'
expect(last_response.status).to eq(200)
expect(last_response.body).to be_blank
get '/foobar'
expect(last_response.status).to eq(404)
expect(last_response.body).to eq('Unrecognized request path: foobar - /foobar')
Expand Down

0 comments on commit f5d3ddc

Please sign in to comment.