handle the case when the JSON hash contains only the unique identifier

This commit is contained in:
Colin Kuskie 2008-05-16 05:40:20 +00:00
parent 06a38c61c3
commit 04412f96c4
2 changed files with 18 additions and 5 deletions

View file

@ -35,7 +35,7 @@ my $session = WebGUI::Test->session;
#----------------------------------------------------------------------------
# Tests
plan tests => 26; # Increment this number for each test you create
plan tests => 27; # Increment this number for each test you create
#----------------------------------------------------------------------------
# put your tests here
@ -251,6 +251,17 @@ cmp_deeply(
$product2->purge;
my $product3 = $root->addChild({
className => "WebGUI::Asset::Sku::Product",
title => "Bible",
});
my $requestedVid = $session->id->generate();
my $bareVid = $product3->setCollateral('variantsJSON', 'bareVid', 'new', { bareVid => $requestedVid });
is($bareVid, $requestedVid, 'For single column collateral JSON, requested id = assigned id');
$product3->purge;
#----------------------------------------------------------------------------
# Cleanup
END {