Sha256: 04cd0ce0642da3ad89fa7f6a30766bdad2059964b9bcc3cb9f0959cc1482fad3

Contents?: true

Size: 735 Bytes

Versions: 5

Compression:

Stored size: 735 Bytes

Contents

require "spec_helper"

module Sucker
  describe "Seller listing search" do
    before do
      @worker = Sucker.new(
        :locale => "us",
        :key    => amazon["key"],
        :secret => amazon["secret"])

      # @worker.curl { |curl| curl.verbose = true }

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

      Sucker.stub(@worker)

      @listings = @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

5 entries across 5 versions & 1 rubygems

Version Path
sucker-0.9.2 spec/integration/seller_listing_search_spec.rb
sucker-0.9.1 spec/integration/seller_listing_search_spec.rb
sucker-0.9.0 spec/integration/seller_listing_search_spec.rb
sucker-0.8.0 spec/integration/seller_listing_search_spec.rb
sucker-0.7.1 spec/integration/seller_listing_search_spec.rb