Sha256: b07648d3e3ee31e2626baa90e0c73ab1f2dbd92d1d16d2ee963ddea2babd202d
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
require "spec_helper" module ShipCompliant describe CheckCompliance do before { savon.mock! } after { savon.unmock! } context "of_sales_order" do let(:message) do { 'Request' => { 'Security' => { 'PartnerKey' => 'abc-123', 'Username' => 'bob@example.com', 'Password' => 'secret' }, 'IncludeSalesTax' => true, 'CustomerKey' => 'CUST-1', 'FooBar' => { 'Baz' => false } } } end let(:response) { File.read('spec/fixtures/check_compliance.xml') } it "queries the client with product information" do savon.expects(:check_compliance_of_sales_order_with_address_validation) .with(message: message).returns(response) result = CheckCompliance.of_sales_order({ include_sales_tax: true, customer_key: 'CUST-1', foo_bar: { baz: false } }) expect(result).to be_kind_of(CheckComplianceResult) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ship_compliant-0.2.1 | spec/lib/ship_compliant/check_compliance_spec.rb |