Added skipAutoCommitWorkflow, committed the versionTag.

addArchive seems to create a new revision, so stuff it inside the existing versionTag
This commit is contained in:
Colin Kuskie 2007-12-21 19:21:18 +00:00
parent 9044285f33
commit ead0016496
2 changed files with 23 additions and 7 deletions

View file

@ -47,6 +47,7 @@ my $album
skipAutoCommitWorkflows => 1,
});
$album->addArchive( WebGUI::Test->getTestCollateralPath('elephant_images.zip') );
$versionTag->commit;
#----------------------------------------------------------------------------
@ -56,7 +57,6 @@ plan tests => 2;
#----------------------------------------------------------------------------
# Test the addArchive sub
# elephant_images.zip contains three jpgs: Aana1.jpg, Aana2.jpg, Aana3.jpg
$album->addArchive( WebGUI::Test->getTestCollateralPath('elephant_images.zip') );
my $images = $album->getLineage(['descendants'], { returnObjects => 1 });
is( scalar @$images, 3, "addArchive() adds one asset per image" );

View file

@ -41,6 +41,11 @@ my $album
= $gallery->addChild({
className => "WebGUI::Asset::Wobject::GalleryAlbum",
ownerUserId => "3", # Admin
},
undef,
undef,
{
skipAutoCommitWorkflows => 1,
});
my @photos;
for my $i ( 0 .. 5 ) {
@ -48,18 +53,24 @@ for my $i ( 0 .. 5 ) {
= $album->addChild({
className => "WebGUI::Asset::File::Image::Photo",
filename => "$i.jpg",
},
undef,
undef,
{
skipAutoCommitWorkflows => 1,
});
}
#----------------------------------------------------------------------------
# Cleanup
END {
$versionTag->rollback();
}
$versionTag->commit;
#----------------------------------------------------------------------------
# Tests
plan no_plan => 1;
plan tests => 1;
TODO: {
local $TODO = "Write some tests";
ok(0, 'No tests here');
}
#----------------------------------------------------------------------------
# Test view_thumbnails
@ -67,3 +78,8 @@ plan no_plan => 1;
#----------------------------------------------------------------------------
# Test www_thumbnails
#----------------------------------------------------------------------------
# Cleanup
END {
$versionTag->rollback();
}