Sha256: 144308d0fc8b91e164b18eca8bb22932f5764721395640a6ef4a2e79f556f251

Contents?: true

Size: 725 Bytes

Versions: 2

Compression:

Stored size: 725 Bytes

Contents

# encoding: utf-8
require "spec_helper"

module Sucker
  describe "A Japanese request" do
    use_vcr_cassette "integration/japan", :record => :new_episodes

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

      worker << {
        "Operation"     => "ItemLookup",
        "IdType"        => "ASIN",
        "ResponseGroup" => ["ItemAttributes", "OfferFull"],
        "ItemId"        => "482224816X" }
      worker.get.find("Item").first
    end

    it "returns an array of items" do
      item.should be_an_instance_of Hash
      item["ItemAttributes"]["Binding"].should eql "単行本(ソフトカバー)"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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