Make the new getPackageList functionally equivalent to the old one.
This commit is contained in:
parent
914620f5a4
commit
3bc2006991
2 changed files with 5 additions and 3 deletions
|
|
@ -80,7 +80,7 @@ sub exportPackage {
|
|||
|
||||
=head2 getPackageList ( )
|
||||
|
||||
Returns an array of hashes containing title, assetId, and className for all assets defined as packages.
|
||||
Returns an array of all assets that the user can view and edit that are packages.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ sub getPackageList {
|
|||
ID: foreach my $id (@packageIds) {
|
||||
my $asset = WebGUI::Asset->newByDynamicClass($session, $id);
|
||||
next ID unless defined $asset;
|
||||
next ID unless $asset->canView && $asset->get('isPackage');
|
||||
next ID unless $asset->get('isPackage');
|
||||
next ID unless ($asset->get('status') eq 'approved' || $asset->get('tagId') eq $session->scratch->get("versionTag"));
|
||||
push @assets, [$asset->getTitle, $asset];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ is(scalar @{ $targetFolderChildren }, 0, 'target folder has no children');
|
|||
|
||||
$versionTag->commit;
|
||||
|
||||
sleep 2;
|
||||
|
||||
$targetFolder->www_deployPackage();
|
||||
|
||||
$targetFolderChildren = $targetFolder->getLineage(["children"], {returnObjects => 1,});
|
||||
|
|
@ -83,7 +85,7 @@ is(scalar @{ $deployedFolderChildren }, 1, 'deployed package folder still has 1
|
|||
isa_ok($deployedFolderChildren->[0] , 'WebGUI::Asset::Snippet', 'deployed child is a Snippet');
|
||||
|
||||
##Unset isPackage in this versionTag for the next tests
|
||||
$folder->update({isPackage => 0});
|
||||
$folder->addRevision({isPackage => 0});
|
||||
|
||||
my $newVersionTag = WebGUI::VersionTag->getWorking($session);
|
||||
WebGUI::Test->tagsToRollback($newVersionTag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue