From 0f475dd013131512c3601cde8d29c240a12babed Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 11 Aug 2010 13:16:50 -0700 Subject: [PATCH] Update the test to handle safe (- => _____) listingIds. --- t/Asset/Wobject/Matrix.t | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/t/Asset/Wobject/Matrix.t b/t/Asset/Wobject/Matrix.t index e3c7becfa..5270502ef 100644 --- a/t/Asset/Wobject/Matrix.t +++ b/t/Asset/Wobject/Matrix.t @@ -134,6 +134,8 @@ is($matrixListing->get('views'),'1','Views were incremented'); # Test getListings my $expectedAssetId = $matrixListing->getId; +my $safeAssetId = $expectedAssetId; +$safeAssetId =~ s/-/_____/; my $listings = $matrix->getListings; @@ -208,19 +210,19 @@ cmp_deeply( $compareListData, {ResultSet=>{ Result=>[ - {$expectedAssetId=>$matrixListingLastUpdatedHuman,fieldType=>"lastUpdated",name=>"Last Updated"}, - {fieldType=>"category",name=>"category1",$expectedAssetId=>$matrixListing->get('title').' '}, - {fieldType=>"category",name=>"category2",$expectedAssetId=>$matrixListing->get('title').' '} + {$safeAssetId=>$matrixListingLastUpdatedHuman,fieldType=>"lastUpdated",name=>"Last Updated"}, + {fieldType=>"category",name=>"category1",$safeAssetId=>$matrixListing->get('title').' '}, + {fieldType=>"category",name=>"category2",$safeAssetId=>$matrixListing->get('title').' '} ] }, ColumnDefs=>[{ - key =>$expectedAssetId, + key =>$safeAssetId, label =>$matrixListing->get('title').' '.$matrixListing->get('version'), formatter =>"formatColors", url =>$matrixListing->getUrl, lastUpdated =>$matrixListingLastUpdatedHuman, }], - ResponseFields=>["attributeId", "name", "description","fieldType", "checked",$expectedAssetId,$expectedAssetId."_compareColor"] + ResponseFields=>["attributeId", "name", "description","fieldType", "checked",$safeAssetId,$safeAssetId."_compareColor"] }, 'Getting compareListData as JSON' );