Update this test, since keywords can be returned in any order from the db.
This commit is contained in:
parent
88e71445d7
commit
6ec1881a3d
1 changed files with 10 additions and 2 deletions
12
t/Asset.t
12
t/Asset.t
|
|
@ -369,10 +369,18 @@ my $session = WebGUI::Test->session;
|
||||||
my $keygate = WebGUI::Keyword->new($session);
|
my $keygate = WebGUI::Keyword->new($session);
|
||||||
is $keygate->getKeywordsForAsset({assetId => $asset->getId}), '', 'not persisted to the db';
|
is $keygate->getKeywordsForAsset({assetId => $asset->getId}), '', 'not persisted to the db';
|
||||||
$asset->write;
|
$asset->write;
|
||||||
is $keygate->getKeywordsForAsset({assetId => $asset->assetId}), 'checkers board, chess set', 'written to the db';
|
cmp_bag(
|
||||||
|
$keygate->getKeywordsForAsset({assetId => $asset->assetId, asArrayRef => 1,}),
|
||||||
|
['checkers board', 'chess set'],
|
||||||
|
'written to the db'
|
||||||
|
);
|
||||||
|
|
||||||
my $asset_copy = $asset->cloneFromDb;
|
my $asset_copy = $asset->cloneFromDb;
|
||||||
is $asset->keywords, 'chess set, checkers board', 'refreshed from db';
|
cmp_bag(
|
||||||
|
WebGUI::Keyword::string2list($asset_copy->keywords),
|
||||||
|
['checkers board', 'chess set'],
|
||||||
|
'refreshed from db'
|
||||||
|
);
|
||||||
|
|
||||||
my $asset2 = $default->addChild({
|
my $asset2 = $default->addChild({
|
||||||
className => 'WebGUI::Asset::Snippet',
|
className => 'WebGUI::Asset::Snippet',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue