Update the Product test for changes in the Storage API.

This commit is contained in:
Colin Kuskie 2010-01-19 18:39:43 -08:00
parent 066e654640
commit b397651620

View file

@ -53,6 +53,7 @@ is($product->getThumbnailUrl(), '', 'Product with no image1 property returns the
my $image = WebGUI::Storage->create($session);
WebGUI::Test->storagesToDelete($image);
$image->addFileFromFilesystem(WebGUI::Test->getTestCollateralPath('lamp.jpg'));
$image->generateThumbnail('lamp.jpg');
my $imagedProduct = $node->addChild({
className => "WebGUI::Asset::Sku::Product",
@ -67,6 +68,7 @@ is($imagedProduct->getThumbnailUrl(), $image->getThumbnailUrl('lamp.jpg'), 'getT
my $otherImage = WebGUI::Storage->create($session);
WebGUI::Test->storagesToDelete($otherImage);
$otherImage->addFileFromFilesystem(WebGUI::Test->getTestCollateralPath('gooey.jpg'));
$otherImage->generateThumbnail('gooey.jpg');
ok($imagedProduct->getThumbnailUrl($otherImage), 'getThumbnailUrl with an explicit storageId returns something');
is($imagedProduct->getThumbnailUrl($otherImage), $otherImage->getThumbnailUrl('gooey.jpg'), 'getThumbnailUrl with an explicit storageId returns the right path to the URL');