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')
|
WebGUI::Test->getTestCollateralPath('lamp.jpg')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$versionTags[-1]->commit;
|
||||||
|
|
||||||
# Thread fields mapped to album fields that should be migrated
|
# Thread fields mapped to album fields that should be migrated
|
||||||
my %threadFields = (
|
my %threadFields = (
|
||||||
content => "description",
|
content => "description",
|
||||||
|
|
@ -147,7 +149,9 @@ ok(
|
||||||
"addAlbumFromThread croaks if second argument is not a Thread asset",
|
"addAlbumFromThread croaks if second argument is not a Thread asset",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
push @versionTags, WebGUI::VersionTag->getWorking( $session );
|
||||||
$utility->addAlbumFromThread( $gallery, $threads[0] );
|
$utility->addAlbumFromThread( $gallery, $threads[0] );
|
||||||
|
$versionTags[-1]->commit;
|
||||||
|
|
||||||
is(
|
is(
|
||||||
scalar @{ $gallery->getAlbumIds }, 1,
|
scalar @{ $gallery->getAlbumIds }, 1,
|
||||||
|
|
@ -155,6 +159,8 @@ is(
|
||||||
);
|
);
|
||||||
|
|
||||||
$album = WebGUI::Asset->newByDynamicClass( $session, $gallery->getAlbumIds->[0] );
|
$album = WebGUI::Asset->newByDynamicClass( $session, $gallery->getAlbumIds->[0] );
|
||||||
|
use Data::Dumper;
|
||||||
|
diag( Dumper $gallery->getAlbumIds );
|
||||||
|
|
||||||
is(
|
is(
|
||||||
$album->get('revisionDate'), $threads[0]->get('revisionDate'),
|
$album->get('revisionDate'), $threads[0]->get('revisionDate'),
|
||||||
|
|
@ -251,7 +257,9 @@ ok(
|
||||||
"addAlbumFromCollaboration croaks if second argument is not a Collaboration asset",
|
"addAlbumFromCollaboration croaks if second argument is not a Collaboration asset",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
push @versionTags, WebGUI::VersionTag->getWorking( $session );
|
||||||
$utility->addAlbumFromCollaboration( $gallery, $collab );
|
$utility->addAlbumFromCollaboration( $gallery, $collab );
|
||||||
|
$versionTags[-1]->commit;
|
||||||
|
|
||||||
is(
|
is(
|
||||||
scalar @{ $gallery->getAlbumIds }, scalar @threads,
|
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
|
# File to GalleryFile field mappings. Should be mostly the same
|
||||||
my %fileField = (
|
my %fileField = (
|
||||||
title => "title",
|
title => "title",
|
||||||
|
|
@ -111,7 +113,9 @@ ok(
|
||||||
"addAlbumFromFolder croaks if second argument is not a Folder asset",
|
"addAlbumFromFolder croaks if second argument is not a Folder asset",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
push @versionTags, WebGUI::VersionTag->getWorking( $session );
|
||||||
$utility->addAlbumFromFolder( $gallery, $folder );
|
$utility->addAlbumFromFolder( $gallery, $folder );
|
||||||
|
$versionTags[-1]->commit;
|
||||||
|
|
||||||
is(
|
is(
|
||||||
scalar @{ $gallery->getAlbumIds }, 1,
|
scalar @{ $gallery->getAlbumIds }, 1,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue