Sha256: d6b255fca75528637fdab0bb93dc05773a573fbf7cf240529b592eef5bb4cfef

Contents?: true

Size: 728 Bytes

Versions: 2

Compression:

Stored size: 728 Bytes

Contents

require "spec_helper"

module Sucker
  describe "Keyword Search" do
    use_vcr_cassette "integration/keyword_search", :record => :new_episodes

    let(:worker) do
      worker = Sucker.new(
        :locale => "us",
        :key    => amazon["key"],
        :secret => amazon["secret"])
      worker << {
        "Operation"   => "ItemSearch",
        "SearchIndex" => "Books",
        "Keywords"    => "zizek lacan",
        "Sort"        => "relevancerank" } # also try salesrank and reviewrank
      worker
    end

    it "returns matches" do
      items  = worker.get.find("Item")
      items.size.should > 0
      items.each do |item|
        item["ItemAttributes"]["Title"].should_not be_nil
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sucker-1.0.0.beta.4 spec/integration/keyword_search_spec.rb
sucker-1.0.0.beta.3 spec/integration/keyword_search_spec.rb