Sha256: 176b8f5f68c1694f8bc314e31642fc5fe0cb61ca093a7a4c30dbb6097ef1fcbf
Contents?: true
Size: 1.41 KB
Versions: 2
Compression:
Stored size: 1.41 KB
Contents
# frozen_string_literal: true require 'helper' require 'mws/recommendations/client' class TestMWSRecommendationsClient < MiniTest::Test def setup @client = MWS::Recommendations::Client.new end def test_getting_last_updated_time_for_recommendations operation = { 'Action' => 'GetLastUpdatedTimeForRecommendations', 'MarketplaceId' => '1' } @client.stub(:run, nil) do @client.get_last_updated_time_for_recommendations('1') end assert_equal operation, @client.operation end def test_listing_recommendations operation = { 'Action' => 'ListRecommendations', 'CategoryQueryList.CategoryQuery.1.FilterOptions.FilterOption.1.Foo' => '1', 'MarketplaceId' => '123' } @client.stub(:run, nil) do @client.list_recommendations('123', category_query_list: [{ 'Foo' => '1' }]) end assert_equal operation, @client.operation end def test_listing_recommendations_by_next_token operation = { 'Action' => 'ListRecommendationsByNextToken', 'NextToken' => '1' } @client.stub(:run, nil) do @client.list_recommendations_by_next_token('1') end assert_equal operation, @client.operation end def test_getting_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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
peddler-2.1.1 | test/unit/mws/test_recommendations_client.rb |
peddler-2.1.0 | test/unit/mws/test_recommendations_client.rb |