Add tests for handling adding new collateral.
Covert features to new collateral API.
This commit is contained in:
parent
4a82ecadf7
commit
d849aacc51
2 changed files with 47 additions and 27 deletions
|
|
@ -35,7 +35,7 @@ my $session = WebGUI::Test->session;
|
|||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
||||
plan tests => 27; # Increment this number for each test you create
|
||||
plan tests => 29; # Increment this number for each test you create
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# put your tests here
|
||||
|
|
@ -262,6 +262,19 @@ is($bareVid, $requestedVid, 'For single column collateral JSON, requested id = a
|
|||
|
||||
$product3->purge;
|
||||
|
||||
my $product4 = $root->addChild({
|
||||
className => "WebGUI::Asset::Sku::Product",
|
||||
title => "Pinch a loaf",
|
||||
});
|
||||
|
||||
my $bareVid = $product4->setCollateral('variantsJSON', 'vid', 'new', { major => 'problem' });
|
||||
isnt($bareVid, 'new', 'setCollateral assigns a new id to collateral without one');
|
||||
|
||||
my $newVid = $product4->setCollateral('variantsJSON', 'vid', 'new', { major => 'problem', vid => 'new' });
|
||||
isnt($newVid, 'new', 'setCollateral assigns a new id to collateral with an id of "new"');
|
||||
|
||||
$product4->purge;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Cleanup
|
||||
END {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue