Sha256: 48aa977815fc3e14004a1e2b8087a8c6db30b506b57821591c2f2e0bedfef4e8

Contents?: true

Size: 1.55 KB

Versions: 2

Compression:

Stored size: 1.55 KB

Contents

require 'test_helper'
require 'mws/feeds/client'

class TestFeedsClient < MiniTest::Test
  def setup
    @client = MWS::Feeds::Client.new
  end

  def test_submit_feed_has_marketplace_id_list
    @client.stub(:run, nil) do
      @client.marketplace_id = 'A1F83G8C2ARO7P'
      @client.submit_feed('content', 'type', marketplace_id_list: '1')
      @client.operation.key?('MarketplaceIdList.Id.1')
    end
  end

  def test_get_feed_submission_list_has_feed_submission_id_list
    @client.stub(:run, nil) do
      @client.get_feed_submission_list(feed_submission_id_list: '1')
      @client.operation.key?('FeedSubmissionIdList.Status.1')
    end
  end

  def test_get_feed_submission_list_has_feed_type_list
    @client.stub(:run, nil) do
      @client.get_feed_submission_list(feed_type_list: '1')
      @client.operation.key?('FeedTypeList.Type.1')
    end
  end

  def test_get_feed_submission_list_has_feed_processing_status_list
    @client.stub(:run, nil) do
      @client.get_feed_submission_list(feed_processing_status_list: '1')
      @client.operation.key?('FeedProcessingStatusList.Status.1')
    end
  end

  def test_get_feed_submission_count_has_feed_type_list
    @client.stub(:run, nil) do
      @client.get_feed_submission_count(feed_type_list: '1')
      @client.operation.key?('FeedTypeList.Type.1')
    end
  end

  def test_get_feed_submission_count_has_feed_processing_status_list
    @client.stub(:run, nil) do
      @client.get_feed_submission_count(feed_processing_status_list: '1')
      @client.operation.key?('FeedProcessingStatusList.Status.1')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
peddler-0.12.4 test/unit/mws/test_feeds_client.rb
peddler-0.12.2 test/unit/mws/test_feeds_client.rb