Sha256: 63c33562554a429d3a6272518727a6421e8d9cbf50423ea4e8c42733b3ed4e54

Contents?: true

Size: 794 Bytes

Versions: 24

Compression:

Stored size: 794 Bytes

Contents

require 'spec_helper'

describe GnipApi::Request do
  it 'generates a request' do
    expect(Proc.new{GnipApi::Request.new}).not_to raise_error
  end

  describe 'request data' do
    before do
      @uri = 'http://localt.com'
      @payload = 'some_payload'
      @headers = {:header => 'a_header'}
      @method = 'POST'
      @request = GnipApi::Request.new(:uri => @uri, :request_method => @method, :payload => @payload, :headers => @headers)
    end
    
    it 'sets method' do
      expect(@request.request_method).to eq(@method)
    end

    it 'sets uri' do
      expect(@request.uri).to eq(@uri)
    end
    
    it 'sets payload' do
      expect(@request.payload).to eq(@payload)
    end
    
    it 'sets headers' do
      expect(@request.headers).to eq(@headers)
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
gnip_api-1.2.4 spec/gnip_api/request_spec.rb
gnip_api-1.2.3 spec/gnip_api/request_spec.rb
gnip_api-1.2.2 spec/gnip_api/request_spec.rb
gnip_api-1.2.1 spec/gnip_api/request_spec.rb
gnip_api-1.2.0 spec/gnip_api/request_spec.rb
gnip_api-1.1.3 spec/gnip_api/request_spec.rb
gnip_api-1.1.2 spec/gnip_api/request_spec.rb
gnip_api-1.1.1 spec/gnip_api/request_spec.rb
gnip_api-1.1.0 spec/gnip_api/request_spec.rb
gnip_api-1.0.6 spec/gnip_api/request_spec.rb
gnip_api-1.0.5 spec/gnip_api/request_spec.rb
gnip_api-1.0.4 spec/gnip_api/request_spec.rb
gnip_api-1.0.3 spec/gnip_api/request_spec.rb
gnip_api-1.0.2 spec/gnip_api/request_spec.rb
gnip_api-1.0.1 spec/gnip_api/request_spec.rb
gnip_api-1.0.0 spec/gnip_api/request_spec.rb
gnip_api-0.0.9 spec/gnip_api/request_spec.rb
gnip_api-0.0.8 spec/gnip_api/request_spec.rb
gnip_api-0.0.7 spec/gnip_api/request_spec.rb
gnip_api-0.0.6 spec/gnip_api/request_spec.rb