We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be0cd9b commit 3a8b250Copy full SHA for 3a8b250
1 file changed
spec/integration/empty_body_spec.rb
@@ -0,0 +1,21 @@
1
+require 'spec_helper'
2
+
3
+class Empty < Goliath::API
4
+ def response(env)
5
+ [201, {}, []]
6
+ end
7
+end
8
9
+describe 'Empty body API' do
10
+ it 'serves a 201 with no body' do
11
+ with_api(Empty) do
12
+ http = EM::HttpRequest.new('http://localhost:9000').get
13
+ http.errback { fail }
14
+ http.callback do |c|
15
+ c.response_header.status.should == 201
16
+ c.response_header['CONTENT_LENGTH'].should == '0'
17
+ stop
18
19
20
21
0 commit comments