Update the test to handle safe (- => _____) listingIds.

This commit is contained in:
Colin Kuskie 2010-08-11 13:16:50 -07:00
parent 0957759fa9
commit 0f475dd013

View file

@ -134,6 +134,8 @@ is($matrixListing->get('views'),'1','Views were incremented');
# Test getListings # Test getListings
my $expectedAssetId = $matrixListing->getId; my $expectedAssetId = $matrixListing->getId;
my $safeAssetId = $expectedAssetId;
$safeAssetId =~ s/-/_____/;
my $listings = $matrix->getListings; my $listings = $matrix->getListings;
@ -208,19 +210,19 @@ cmp_deeply(
$compareListData, $compareListData,
{ResultSet=>{ {ResultSet=>{
Result=>[ Result=>[
{$expectedAssetId=>$matrixListingLastUpdatedHuman,fieldType=>"lastUpdated",name=>"Last Updated"}, {$safeAssetId=>$matrixListingLastUpdatedHuman,fieldType=>"lastUpdated",name=>"Last Updated"},
{fieldType=>"category",name=>"category1",$expectedAssetId=>$matrixListing->get('title').' '}, {fieldType=>"category",name=>"category1",$safeAssetId=>$matrixListing->get('title').' '},
{fieldType=>"category",name=>"category2",$expectedAssetId=>$matrixListing->get('title').' '} {fieldType=>"category",name=>"category2",$safeAssetId=>$matrixListing->get('title').' '}
] ]
}, },
ColumnDefs=>[{ ColumnDefs=>[{
key =>$expectedAssetId, key =>$safeAssetId,
label =>$matrixListing->get('title').' '.$matrixListing->get('version'), label =>$matrixListing->get('title').' '.$matrixListing->get('version'),
formatter =>"formatColors", formatter =>"formatColors",
url =>$matrixListing->getUrl, url =>$matrixListing->getUrl,
lastUpdated =>$matrixListingLastUpdatedHuman, lastUpdated =>$matrixListingLastUpdatedHuman,
}], }],
ResponseFields=>["attributeId", "name", "description","fieldType", "checked",$expectedAssetId,$expectedAssetId."_compareColor"] ResponseFields=>["attributeId", "name", "description","fieldType", "checked",$safeAssetId,$safeAssetId."_compareColor"]
}, },
'Getting compareListData as JSON' 'Getting compareListData as JSON'
); );