Sha256: 764f58111de7ab81d02e0a945ae538c0cbeee2d01ff44db7accf329d780e813e

Contents?: true

Size: 747 Bytes

Versions: 1

Compression:

Stored size: 747 Bytes

Contents

# encoding: utf-8
require "spec_helper"

module Sucker
  describe "Seller listing search" do
    use_vcr_cassette "integration/seller_listings_search", :record => :new_episodes

    let(:listings) do
      worker = Sucker.new(
        :locale => "us",
        :key    => amazon["key"],
        :secret => amazon["secret"])

      worker << {
        "Operation"   => "SellerListingSearch",
        "SellerId"    => "A31N271NVIORU3" }

      worker.get.node("SellerListings").first
    end

    it "returns page count" do
      listings["TotalPages"].to_i.should be > 0
    end

    it "returns listings" do
      listings["SellerListing"].size.should be > 0
      listings["SellerListing"].first.has_key?("Price").should be_true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sucker-1.0.0.beta.1 spec/integration/seller_listing_search_spec.rb