Sha256: 828261b38cd6d0bc50817a0c0a33963651bd0d14230dd260cf1933b59d63d61c

Contents?: true

Size: 662 Bytes

Versions: 47

Compression:

Stored size: 662 Bytes

Contents

require 'spec_helper'

describe NetSuite::Support::Requests do
  let(:instance) do
    obj = Object.new
    obj.extend(NetSuite::Support::Requests)
    obj
  end

  describe '#call' do
    before do
      instance.stub(:request)
      instance.stub(:success?)
      instance.stub(:response_body)
    end

    it 'calls #request' do
      instance.should_receive(:request)
      instance.call
    end

    it 'calls #build_response' do
      instance.should_receive(:build_response)
      instance.call
    end

    it 'returns a NetSuite::Response object' do
      response = instance.call
      response.should be_kind_of(NetSuite::Response)
    end
  end

end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
netsuite-0.0.17 spec/netsuite/support/requests_spec.rb
netsuite-0.0.16 spec/netsuite/support/requests_spec.rb
netsuite-0.0.15 spec/netsuite/support/requests_spec.rb
netsuite-0.0.14 spec/netsuite/support/requests_spec.rb
netsuite-0.0.13 spec/netsuite/support/requests_spec.rb
netsuite-0.0.12 spec/netsuite/support/requests_spec.rb
netsuite-0.0.11 spec/netsuite/support/requests_spec.rb