Sha256: 28d815eafa3120a2de2118b03e69d4e02b5cb39b2eeec3ef6f4c9c90a528ab56
Contents?: true
Size: 885 Bytes
Versions: 20
Compression:
Stored size: 885 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe "Inventory" do it "loads the first page of inventory data" do AmazonSellerCentral.mechanizer.reset! page = AmazonSellerCentral::Inventory.load_first_page page.should be_kind_of(AmazonSellerCentral::InventoryPage) page.body.should =~ INVENTORY_FIRST_PAGE_TEST_REGEX end it "loads all inventory pages" do AmazonSellerCentral.mechanizer.reset! pages = AmazonSellerCentral::Inventory.load_all_pages pages.size.should == 3 pages.first.body.should =~ INVENTORY_FIRST_PAGE_TEST_REGEX pages.last.body.should =~ INVENTORY_LAST_PAGE_TEST_REGEX end it "passes a page to a block when given" do last_seen = nil AmazonSellerCentral::Inventory.each_page do |page| last_seen = page end last_seen.body.should =~ INVENTORY_LAST_PAGE_TEST_REGEX end end
Version data entries
20 entries across 20 versions & 1 rubygems