Sha256: 89fb409b05b5e2cb40e2dd72f22d9e59a8c642674ed41412f89c78feffbfa933

Contents?: true

Size: 918 Bytes

Versions: 2

Compression:

Stored size: 918 Bytes

Contents

require 'helper'
require 'ebay/product_metadata'

class TestProductMetadata < Minitest::Test
  def setup
    VCR.insert_cassette('product_metadata')

    @product_metadata = Ebay::ProductMetadata.new
    @product_metadata.sandbox!
  end

  def teardown
    VCR.eject_cassette
  end

  def test_gets_product_search_data_version
    params = {
      'GLOBAL-ID' => 'EBAY-US',
      'OPERATION-NAME' => 'getProductSearchDataVersion',
      'categoryId' => '123'
    }
    parser = @product_metadata.get(query: params, expects: 200)
    assert_kind_of Hash, parser.parse
  end

  def test_gets_product_search_data_version_with_json
    params = {
      'RESPONSE-DATA-FORMAT' => 'JSON',
      'GLOBAL-ID' => 'EBAY-US',
      'OPERATION-NAME' => 'getProductSearchDataVersion',
      'categoryId' => '123'
    }
    parser = @product_metadata.get(query: params, expects: 200)
    assert_kind_of Hash, parser.parse
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ebay-ruby-0.2.0 test/test_product_metadata.rb
ebay-ruby-0.0.1 test/test_product_metadata.rb