Sha256: 23ad70d69f3f9e50384248ec048fb11c5c7f72ad773204cbeed0563598a15c3e

Contents?: true

Size: 599 Bytes

Versions: 3

Compression:

Stored size: 599 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 = Yajl::Parser.parse(c.response)
        resp['body'].should match('some=data')
        resp['head'].should include('X-Upload')
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
goliath-0.9.4 spec/integration/async_request_processing.rb
goliath-0.9.2 spec/integration/async_request_processing.rb
goliath-0.9.1 spec/integration/async_request_processing.rb