Sha256: 6674d7e37463dc79b70e72433e4cab69705148ee96593bf094e6230903dff1d5

Contents?: true

Size: 410 Bytes

Versions: 10

Compression:

Stored size: 410 Bytes

Contents

require 'spec_helper'

class Empty < Goliath::API
  def response(env)
    [201, {}, []]
  end
end

describe 'Empty body API' do
  let(:err) { Proc.new { fail "API request failed" } }

  it 'serves a 201 with no body' do
    with_api(Empty) do
      get_request({}, err) do |c|
        c.response_header.status.should == 201
        c.response_header['CONTENT_LENGTH'].should == '0'
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
goliath-1.0.5 spec/integration/empty_body_spec.rb
goliath-1.0.4 spec/integration/empty_body_spec.rb
goliath-1.0.3 spec/integration/empty_body_spec.rb
goliath-1.0.2 spec/integration/empty_body_spec.rb
goliath-1.0.1 spec/integration/empty_body_spec.rb
goliath-1.0.0 spec/integration/empty_body_spec.rb
goliath-1.0.0.beta.1 spec/integration/empty_body_spec.rb
goliath-0.9.4 spec/integration/empty_body_spec.rb
goliath-0.9.2 spec/integration/empty_body_spec.rb
goliath-0.9.1 spec/integration/empty_body_spec.rb