Sha256: 390a73467f15d01551b4022a62b00974a31c8ae2f9e8b9b5a67373acf2569d14

Contents?: true

Size: 860 Bytes

Versions: 4

Compression:

Stored size: 860 Bytes

Contents

require 'integration_helper'
require 'mws/feeds'

class TestFeeds < IntegrationTest
  def test_gets_feed_submission_count
    clients.each do |client|
      res = client.get_feed_submission_count
      refute_empty res.parse
    end
  end

  def test_gets_feed_submission_list
    clients.each do |client|
      res = client.get_feed_submission_list
      refute_empty res.parse
    end
  end

  def test_submits_feeds
    content = "sku\tprice\tquantity\nwidget\t\t0\n"
    type = '_POST_FLAT_FILE_PRICEANDQUANTITYONLY_UPDATE_DATA_'

    clients.each do |client|
      res = client.submit_feed(content, type)
      id = res.parse['FeedSubmissionInfo']['FeedSubmissionId']
      refute_nil id

      # Clean up
      client.body = nil
      client.cancel_feed_submissions(
        feed_submission_id: id,
        feed_type_list: type
      )
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
peddler-1.6.0 test/integration/test_feeds.rb
peddler-1.5.0 test/integration/test_feeds.rb
peddler-1.4.1 test/integration/test_feeds.rb
peddler-1.4.0 test/integration/test_feeds.rb