Sha256: f9099c25074ac6f67633ea110db13df540734f7520c4e58bc69b62b97be15c9b

Contents?: true

Size: 660 Bytes

Versions: 2

Compression:

Stored size: 660 Bytes

Contents

require 'integration_helper'
require 'mws/orders'

class OrdersTest < IntegrationTest
  self.api = MWS::Orders

  def test_lists_and_gets_orders
    @clients.each do |client|
      amazon_order_ids = []
      orders = client.list_orders(created_after: Date.today - 365)
      amazon_order_ids << orders.to_a.sample.amazon_order_id

      orders = client.list_orders_by_next_token
      amazon_order_ids << orders.to_a.sample.amazon_order_id

      orders = client.list_orders_by_next_token(orders.next_token)
      amazon_order_ids << orders.to_a.sample.amazon_order_id

      orders = client.get_order(*amazon_order_ids)
      assert orders
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
peddler-0.6.5 test/integration/orders/test_orders.rb
peddler-0.6.4 test/integration/orders/test_orders.rb