Sha256: cf22e962b0c1b5c41f6fdaa3cc5f7ca80238c7dbd28045a1ce41e066a1425127

Contents?: true

Size: 603 Bytes

Versions: 2

Compression:

Stored size: 603 Bytes

Contents

require 'spec_helper'
require File.join(File.dirname(__FILE__), '../../', 'examples/async_upload')

describe 'Async Request processing' do
  it 'asynchronously processes the incoming request' do
    with_api(AsyncUpload) do
      request_data = {
        :body => {:some => :data},
        :head => {'X-Upload' => 'custom'}
      }

      err = Proc.new { fail "API request failed" }

      post_request(request_data, err) do |c|
        resp = MultiJson.load(c.response)
        expect(resp['body']).to match('some=data')
        expect(resp['head']).to include('X-Upload')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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