Sha256: 1727d15b91dfecc714554b35f92501cb3c713626025d64f95be8bc32cd5d4019

Contents?: true

Size: 956 Bytes

Versions: 1

Compression:

Stored size: 956 Bytes

Contents

require 'spec_helper'

describe MWS::API::Inventory do

  before :all do
    EphemeralResponse.activate
    @mws = MWS.new(auth_params)
    @timestamp = "2012-04-25T21:42:11-04:00"
  end

  context "requests" do

    describe "list_inventory_supply" do
      it "should return items based on seller SKUs" do
        items = @mws.inventory.list_inventory_supply :timestamp => @timestamp,
          :seller_skus => %w[PF-5VZN-04XR V4-03EY-LAL1 OC-TUKC-031P]
        items.should have_key :inventory_supply_list
        items.inventory_supply_list.should be_an_instance_of Array
      end

      it "should return items with inventory changes since a certain time" do
        items = @mws.inventory.list_inventory_supply :timestamp => @timestamp,
          :query_start_date_time => "2012-01-15T10:04:01-05:00"
        items.should have_key :inventory_supply_list
        items.inventory_supply_list.should be_an_instance_of Array
      end
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-mws-0.0.4 spec/ruby-mws/api/inventory_spec.rb