Sha256: efd3dbecda51d018827b38995423b7c7ba6d90f296bd3198ea51a03f600f4000

Contents?: true

Size: 420 Bytes

Versions: 2

Compression:

Stored size: 420 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|
        expect(c.response_header.status).to eq(201)
        expect(c.response_header['CONTENT_LENGTH']).to eq('0')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
goliath-1.0.7 spec/integration/empty_body_spec.rb
goliath-1.0.6 spec/integration/empty_body_spec.rb