Sha256: 4bc4a4e1e1579723a4ee35cfc9c2750468966ef266f7fbb9b32ab8c757e31614

Contents?: true

Size: 595 Bytes

Versions: 7

Compression:

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
goliath-1.0.5 spec/integration/async_request_processing.rb
goliath-1.0.4 spec/integration/async_request_processing.rb
goliath-1.0.3 spec/integration/async_request_processing.rb
goliath-1.0.2 spec/integration/async_request_processing.rb
goliath-1.0.1 spec/integration/async_request_processing.rb
goliath-1.0.0 spec/integration/async_request_processing.rb
goliath-1.0.0.beta.1 spec/integration/async_request_processing.rb