Update the JSON collateral test. Duplicate JSONCollateral into a Role so it can be used with Assets.
This commit is contained in:
parent
b8fc033bd7
commit
9b071c1510
3 changed files with 319 additions and 43 deletions
|
|
@ -46,6 +46,8 @@ create table jsonCollateralDummy (
|
|||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
EOSQL
|
||||
|
||||
WebGUI::Test->addToCleanup(SQL => 'drop table jsonCollateralDummy');
|
||||
|
||||
plan tests => 40;
|
||||
|
||||
my $asset = WebGUI::Asset->getDefault($session)->addChild({
|
||||
|
|
@ -54,6 +56,7 @@ my $asset = WebGUI::Asset->getDefault($session)->addChild({
|
|||
});
|
||||
|
||||
my $tag = WebGUI::VersionTag->getWorking($session);
|
||||
WebGUI::Test->addToCleanup($tag);
|
||||
$tag->commit;
|
||||
|
||||
################################################################
|
||||
|
|
@ -97,7 +100,7 @@ cmp_deeply(
|
|||
#
|
||||
################################################################
|
||||
|
||||
my $assetClone = WebGUI::Asset->new($session, $asset->getId, 'WebGUI::Asset::JSONCollateralDummy');
|
||||
my $assetClone = $asset->cloneFromDb;
|
||||
|
||||
cmp_deeply(
|
||||
$assetClone->get('jsonField'),
|
||||
|
|
@ -344,13 +347,3 @@ cmp_deeply(
|
|||
'...collateral was removed'
|
||||
);
|
||||
|
||||
note $asset->getId;
|
||||
|
||||
|
||||
$tag->rollback;
|
||||
$asset->purge;
|
||||
|
||||
$session->db->write(<<EOSQL);
|
||||
drop table jsonCollateralDummy
|
||||
EOSQL
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue