Fix a bug in getLineageSql, where it would return the empty string. This could cause downstream problems. Fixes bug #11616
This commit is contained in:
parent
4eb013ef03
commit
2c08b4e712
3 changed files with 27 additions and 6 deletions
|
|
@ -17,7 +17,7 @@ use WebGUI::Session;
|
|||
use WebGUI::User;
|
||||
|
||||
use WebGUI::Asset;
|
||||
use Test::More tests => 93; # increment this value for each test you create
|
||||
use Test::More tests => 96; # increment this value for each test you create
|
||||
use Test::Deep;
|
||||
|
||||
# Test the methods in WebGUI::AssetLineage
|
||||
|
|
@ -445,6 +445,22 @@ cmp_bag(
|
|||
'getLineage: descendants of topFolder',
|
||||
);
|
||||
|
||||
$ids = $root->getLineage(['ancestors']);
|
||||
cmp_deeply(
|
||||
$ids,
|
||||
[],
|
||||
'... getting ancestors of root returns empty array'
|
||||
);
|
||||
|
||||
####################################################
|
||||
#
|
||||
# getLineageSql
|
||||
#
|
||||
####################################################
|
||||
|
||||
note "getLineageSql";
|
||||
ok $root->getLineageSql(['ancestors']), 'valid SQL returned in an error condition';
|
||||
|
||||
####################################################
|
||||
#
|
||||
# getLineageIterator
|
||||
|
|
@ -497,6 +513,13 @@ cmp_bag(
|
|||
'getLineageIterator: descendants of topFolder',
|
||||
);
|
||||
|
||||
my $empty = getListFromIterator($root->getLineageIterator(['ancestors']));
|
||||
cmp_bag(
|
||||
$empty,
|
||||
[],
|
||||
'... getting ancestors of root returns empty array'
|
||||
);
|
||||
|
||||
####################################################
|
||||
#
|
||||
# addChild
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue