From 6ec1881a3d3c36c90a408741f2478332e83e93ce Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 10 Jun 2010 16:15:41 -0700 Subject: [PATCH] Update this test, since keywords can be returned in any order from the db. --- t/Asset.t | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/t/Asset.t b/t/Asset.t index 79fa4ec4e..e7c1de76a 100644 --- a/t/Asset.t +++ b/t/Asset.t @@ -369,10 +369,18 @@ my $session = WebGUI::Test->session; my $keygate = WebGUI::Keyword->new($session); is $keygate->getKeywordsForAsset({assetId => $asset->getId}), '', 'not persisted to the db'; $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; - 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({ className => 'WebGUI::Asset::Snippet',