Sha256: 3f283dd2a709b578bd90cbebeb5dd6048d3ee00a6111fecb7c2bfa43106c186b

Contents?: true

Size: 970 Bytes

Versions: 18

Compression:

Stored size: 970 Bytes

Contents

require 'spec_helper'

module GoTransverseTractApi

  RSpec.describe Order::People do
    before(:each) { http_auth }

    let(:eid) { '4096' }
    let(:response)  { {a: 'b', c: 'd'} }

    context ".add_address" do
      it "adds address for the customer" do
        eid = '48406'

        data = {
          city: 'fsfsfs',
          country: 'USA',
          line1: 'wefsvgg ggdgdgd',
          postal_code: '232433',
          purpose: 'Billing',
          region_or_state: 'CA'
        }

        allow(subject).to receive(:add_address).with(eid, data).and_return(response)
        expect(subject.add_address(eid, data)).to eq(response)
      end
    end

    context ".update" do
      it "updates a person details" do
        data = { eid: eid, name: 'John Smith', tax_id_number: '124224242' }

        allow(subject).to receive(:update).with(eid, data).and_return(response)
        expect(subject.update(eid, data)).to eq(response)
      end
    end

  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
gotransverse-tract-api-0.9.1 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.9.0 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.8.1 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.8.0 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.7.5 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.7.4 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.7.3 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.7.2 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.7.1 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.7.0 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.6.7 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.6.6 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.6.5 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.6.4 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.6.3 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.6.2 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.6.1 spec/gotransverse-tract-api/order/people_spec.rb
gotransverse-tract-api-0.6.0 spec/gotransverse-tract-api/order/people_spec.rb