Sha256: 3b2f7ea9bfc3b9e6c62a8a0d8ac577f1482db6170deb5969f497f6e24642dd40

Contents?: true

Size: 758 Bytes

Versions: 2

Compression:

Stored size: 758 Bytes

Contents

require "spec_helper"

module Sucker
  describe "Alternate versions" do
    use_vcr_cassette "integration/alternate_versions", :record => :new_episodes

    let(:worker) do
      worker = Sucker.new(
        :locale => "uk",
        :key    => amazon["key"],
        :secret => amazon["secret"])
      worker << {
        "Operation"     => "ItemLookup",
        "IdType"        => "ASIN",
        "ResponseGroup" => "AlternateVersions",
        "ItemId"        => "0141044012" }
      worker
    end

    it "returns alternate versions" do
      response = worker.get
      alternate_versions = response.find("AlternateVersion")
      alternate_versions.should be_an_instance_of Array
      alternate_versions.first.should have_key "ASIN"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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