Sha256: c80300cf670ef788002e73c9bbbfe324512b50cdc80b5cf46ffd1d85ba203380

Contents?: true

Size: 1.18 KB

Versions: 16

Compression:

Stored size: 1.18 KB

Contents

require 'helper'
require 'mws/cart_information/client'

class TestMWSCartInformationClient < MiniTest::Test
  def setup
    @client = MWS::CartInformation::Client.new
  end

  def test_lists_carts
    operation = {
      'Action' => 'ListCarts',
      'DateRangeStart' => '1'
    }

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

    assert_equal operation, @client.operation
  end

  def test_lists_carts_by_next_token
    operation = {
      'Action' => 'ListCartsByNextToken',
      'NextToken' => '1'
    }

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

    assert_equal operation, @client.operation
  end

  def test_gets_carts
    operation = {
      'Action' => 'GetCarts',
      'MarketplaceId' => '1',
      'CartIdList.CartId.1' => '2',
      'CartIdList.CartId.2' => '3'
    }

    @client.stub(:run, nil) do
      @client.get_carts('1', '2', '3')
    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_cart_information_client.rb
peddler-1.2.0 test/unit/mws/test_cart_information_client.rb
peddler-1.1.1 test/unit/mws/test_cart_information_client.rb
peddler-1.1.0 test/unit/mws/test_cart_information_client.rb
peddler-1.0.2 test/unit/mws/test_cart_information_client.rb
peddler-1.0.1 test/unit/mws/test_cart_information_client.rb
peddler-1.0.0 test/unit/mws/test_cart_information_client.rb
peddler-0.19.0 test/unit/mws/test_cart_information_client.rb
peddler-0.18.0 test/unit/mws/test_cart_information_client.rb
peddler-0.17.1 test/unit/mws/test_cart_information_client.rb
peddler-0.17.0 test/unit/mws/test_cart_information_client.rb
peddler-0.16.0 test/unit/mws/test_cart_information_client.rb
peddler-0.15.0 test/unit/mws/test_cart_information_client.rb
peddler-0.14.0 test/unit/mws/test_cart_information_client.rb
peddler-0.13.0 test/unit/mws/test_cart_information_client.rb
peddler-0.12.7 test/unit/mws/test_cart_information_client.rb