From ead0016496cfd584f368d7d08e7f07df9bc65d56 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 21 Dec 2007 19:21:18 +0000 Subject: [PATCH] Added skipAutoCommitWorkflow, committed the versionTag. addArchive seems to create a new revision, so stuff it inside the existing versionTag --- t/Asset/Wobject/GalleryAlbum/addArchive.t | 2 +- t/Asset/Wobject/GalleryAlbum/thumbnails.t | 28 ++++++++++++++++++----- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/t/Asset/Wobject/GalleryAlbum/addArchive.t b/t/Asset/Wobject/GalleryAlbum/addArchive.t index 1b34d70ea..0dfa314a2 100644 --- a/t/Asset/Wobject/GalleryAlbum/addArchive.t +++ b/t/Asset/Wobject/GalleryAlbum/addArchive.t @@ -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" ); diff --git a/t/Asset/Wobject/GalleryAlbum/thumbnails.t b/t/Asset/Wobject/GalleryAlbum/thumbnails.t index c4ac4a0a8..e7155b494 100644 --- a/t/Asset/Wobject/GalleryAlbum/thumbnails.t +++ b/t/Asset/Wobject/GalleryAlbum/thumbnails.t @@ -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(); +}