Fix the pending flag, get a fresh copy of the photo asset under test.
This commit is contained in:
parent
416c3737c6
commit
dcdd671b2c
2 changed files with 3 additions and 6 deletions
|
|
@ -524,10 +524,7 @@ sub getTemplateVars {
|
|||
$var->{ fileUrl } = $self->getFileUrl;
|
||||
$var->{ thumbnailUrl } = $self->getThumbnailUrl;
|
||||
|
||||
# Set a flag for pending files
|
||||
if ( $self->status eq "pending" ) {
|
||||
$var->{ 'isPending' } = 1;
|
||||
}
|
||||
$var->{ isPending } = $self->status eq "pending";
|
||||
|
||||
# Fix 'undef' vars since HTML::Template does inheritence on them
|
||||
for my $key ( qw( synopsis ) ) {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ my $nextPhoto
|
|||
skipAutoCommitWorkflows => 1,
|
||||
});
|
||||
$versionTag->commit;
|
||||
foreach my $asset ($gallery, $album) {
|
||||
foreach my $asset ($gallery, $album, $photo) {
|
||||
$asset = $asset->cloneFromDb;
|
||||
}
|
||||
WebGUI::Test->addToCleanup($versionTag);
|
||||
|
|
@ -110,7 +110,7 @@ my $testTemplateVars = {
|
|||
thumbnailUrl => $photo->getThumbnailUrl,
|
||||
numberOfComments => scalar @{ $photo->getCommentIds },
|
||||
exifLoop => ignore(), # Tested elsewhere
|
||||
isPending => ( $photo->get("status") eq "pending" ),
|
||||
isPending => ( $photo->status eq "pending" ),
|
||||
firstFile_url => $previousPhoto->getUrl,
|
||||
firstFile_thumbnailUrl
|
||||
=> $previousPhoto->getThumbnailUrl,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue