Sha256: ffee5747a8b67b4434ecc65eef30141c1c14e90eca2db3b4f0763680c95cdd5c

Contents?: true

Size: 664 Bytes

Versions: 1

Compression:

Stored size: 664 Bytes

Contents

require 'helper'
require 'mws/orders'

class TestOrders < IntegrationTest
  def test_gets_orders
    clients.each do |client|
      order_ids = client
        .list_orders(
          created_after: Date.new(2015),
          max_results_per_page: 5
        )
        .parse
        .dig('Orders', 'Order')
        .map { |order| order['AmazonOrderId'] }

      orders = client
        .get_order(*order_ids)
        .parse
        .dig('Orders', 'Order')

      assert_equal order_ids.count, orders.count
    end
  end

  def test_gets_service_status
    clients.each do |client|
      res = client.get_service_status
      refute_empty res.parse
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
peddler-1.3.0 test/integration/test_orders.rb