diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 0eb0f86f5..1443bfaa3 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -315,7 +315,7 @@ sub _build_assetKeywords { my $self = shift; my $session = $self->session; my $keywords = WebGUI::Keyword->new($session); - return $keywords->getKeywordsForAsset({asset => $self, asArrayRef => 1 }); + return $keywords->getKeywordsForAsset({asset => $self, }); } around BUILDARGS => sub { diff --git a/t/Asset.t b/t/Asset.t index 31af7bd84..79fa4ec4e 100644 --- a/t/Asset.t +++ b/t/Asset.t @@ -363,16 +363,16 @@ my $session = WebGUI::Test->session; }); WebGUI::Test->addToCleanup($asset); can_ok($asset, 'keywords'); - $asset->keywords('chess set'); - is ($asset->keywords, 'chess set', 'set and get of keywords via direct accessor'); - is ($asset->get('keywords'), 'chess set', 'via get method'); + $asset->keywords('chess set, checkers board'); + is ($asset->keywords, 'chess set, checkers board', 'set and get of keywords via direct accessor'); + is ($asset->get('keywords'), 'chess set, checkers board', 'via get method'); 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}), 'chess set', 'written to the db'; + is $keygate->getKeywordsForAsset({assetId => $asset->assetId}), 'checkers board, chess set', 'written to the db'; my $asset_copy = $asset->cloneFromDb; - is $asset->keywords, 'chess set', 'refreshed from db'; + is $asset->keywords, 'chess set, checkers board', 'refreshed from db'; my $asset2 = $default->addChild({ className => 'WebGUI::Asset::Snippet',