fixed WebGUI::Utility::Gallery tests
This commit is contained in:
parent
40e28848d0
commit
35e5b95fb6
2 changed files with 12 additions and 0 deletions
|
|
@ -81,6 +81,8 @@ $posts[0][0]->getStorageLocation->addFileFromFilesystem(
|
|||
WebGUI::Test->getTestCollateralPath('lamp.jpg')
|
||||
);
|
||||
|
||||
$versionTags[-1]->commit;
|
||||
|
||||
# Thread fields mapped to album fields that should be migrated
|
||||
my %threadFields = (
|
||||
content => "description",
|
||||
|
|
@ -147,7 +149,9 @@ ok(
|
|||
"addAlbumFromThread croaks if second argument is not a Thread asset",
|
||||
);
|
||||
|
||||
push @versionTags, WebGUI::VersionTag->getWorking( $session );
|
||||
$utility->addAlbumFromThread( $gallery, $threads[0] );
|
||||
$versionTags[-1]->commit;
|
||||
|
||||
is(
|
||||
scalar @{ $gallery->getAlbumIds }, 1,
|
||||
|
|
@ -155,6 +159,8 @@ is(
|
|||
);
|
||||
|
||||
$album = WebGUI::Asset->newByDynamicClass( $session, $gallery->getAlbumIds->[0] );
|
||||
use Data::Dumper;
|
||||
diag( Dumper $gallery->getAlbumIds );
|
||||
|
||||
is(
|
||||
$album->get('revisionDate'), $threads[0]->get('revisionDate'),
|
||||
|
|
@ -251,7 +257,9 @@ ok(
|
|||
"addAlbumFromCollaboration croaks if second argument is not a Collaboration asset",
|
||||
);
|
||||
|
||||
push @versionTags, WebGUI::VersionTag->getWorking( $session );
|
||||
$utility->addAlbumFromCollaboration( $gallery, $collab );
|
||||
$versionTags[-1]->commit;
|
||||
|
||||
is(
|
||||
scalar @{ $gallery->getAlbumIds }, scalar @threads,
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ for (0..2) {
|
|||
);
|
||||
}
|
||||
|
||||
$versionTags[-1]->commit;
|
||||
|
||||
# File to GalleryFile field mappings. Should be mostly the same
|
||||
my %fileField = (
|
||||
title => "title",
|
||||
|
|
@ -111,7 +113,9 @@ ok(
|
|||
"addAlbumFromFolder croaks if second argument is not a Folder asset",
|
||||
);
|
||||
|
||||
push @versionTags, WebGUI::VersionTag->getWorking( $session );
|
||||
$utility->addAlbumFromFolder( $gallery, $folder );
|
||||
$versionTags[-1]->commit;
|
||||
|
||||
is(
|
||||
scalar @{ $gallery->getAlbumIds }, 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue