Sha256: d4e5a17740ec56a830a783a0659df0a6eb7030f8dee55e2ffb8fc49147b1f769

Contents?: true

Size: 1.21 KB

Versions: 16

Compression:

Stored size: 1.21 KB

Contents

require 'helper'
require 'mws/customer_information/client'

class TestMWSCustomerInformationClient < MiniTest::Test
  def setup
    @client = MWS::CustomerInformation::Client.new
  end

  def test_lists_customers
    operation = {
      'Action' => 'ListCustomers'
    }

    @client.stub(:run, nil) do
      @client.list_customers
    end

    assert_equal operation, @client.operation
  end

  def test_lists_customers_by_next_token
    operation = {
      'Action' => 'ListCustomersByNextToken',
      'NextToken' => '1'
    }

    @client.stub(:run, nil) do
      @client.list_customers_by_next_token('1')
    end

    assert_equal operation, @client.operation
  end

  def test_gets_customers_for_customer_id
    operation = {
      'Action' => 'GetCustomersForCustomerId',
      'CustomerIdList.CustomerId.1' => '1',
      'CustomerIdList.CustomerId.2' => '2'
    }

    @client.stub(:run, nil) do
      @client.get_customers_for_customer_id('1', '2')
    end

    assert_equal operation, @client.operation
  end

  def test_gets_service_status
    operation = {
      'Action' => 'GetServiceStatus'
    }

    @client.stub(:run, nil) do
      @client.get_service_status
    end

    assert_equal operation, @client.operation
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
peddler-1.3.0 test/unit/mws/test_customer_information_client.rb
peddler-1.2.0 test/unit/mws/test_customer_information_client.rb
peddler-1.1.1 test/unit/mws/test_customer_information_client.rb
peddler-1.1.0 test/unit/mws/test_customer_information_client.rb
peddler-1.0.2 test/unit/mws/test_customer_information_client.rb
peddler-1.0.1 test/unit/mws/test_customer_information_client.rb
peddler-1.0.0 test/unit/mws/test_customer_information_client.rb
peddler-0.19.0 test/unit/mws/test_customer_information_client.rb
peddler-0.18.0 test/unit/mws/test_customer_information_client.rb
peddler-0.17.1 test/unit/mws/test_customer_information_client.rb
peddler-0.17.0 test/unit/mws/test_customer_information_client.rb
peddler-0.16.0 test/unit/mws/test_customer_information_client.rb
peddler-0.15.0 test/unit/mws/test_customer_information_client.rb
peddler-0.14.0 test/unit/mws/test_customer_information_client.rb
peddler-0.13.0 test/unit/mws/test_customer_information_client.rb
peddler-0.12.7 test/unit/mws/test_customer_information_client.rb