From a17e4288ba915c8168e13e75b4c7edef95959656 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 3 Feb 2009 20:27:36 +0000 Subject: [PATCH] Remove tests for file content that do not work because files stream. Update error message in test to match how the code works. --- t/Asset/AssetExportHtml.t | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/t/Asset/AssetExportHtml.t b/t/Asset/AssetExportHtml.t index 1e8e05f68..bd177fbe6 100644 --- a/t/Asset/AssetExportHtml.t +++ b/t/Asset/AssetExportHtml.t @@ -41,7 +41,7 @@ my $originalExportPath = $session->config->get('exportPath'); my $testRan = 1; -plan tests => 146; # Increment this number for each test you create +plan tests => 144; # Increment this number for each test you create #---------------------------------------------------------------------------- # exportCheckPath() @@ -436,9 +436,6 @@ is($@, '', 'exportWriteFile for perl file works'); ok(-e $asset->exportGetUrlAsPath->absolute->stringify, "exportWriteFile actually writes the perl file"); -eval { $content = WebGUI::Test->getPage($asset, 'exportHtml_view') }; -is(scalar $asset->exportGetUrlAsPath->absolute->slurp, $content, "exportWriteFile puts correct content in exported perl file"); - $guidPath->rmtree; $asset = WebGUI::Asset->new($session, 'ExportTest000000000002'); eval { $asset->exportWriteFile() }; @@ -446,9 +443,6 @@ is($@, '', 'exportWriteFile for plain file works'); ok(-e $asset->exportGetUrlAsPath->absolute->stringify, "exportWriteFile actuall writes the plain file"); -eval { $content = WebGUI::Test->getPage($asset, 'exportHtml_view') }; -is(scalar $asset->exportGetUrlAsPath->absolute->slurp, $content, "exportWriteFile puts correct content in exported plain file"); - $guidPath->rmtree; # next, make sure an exception is thrown if the user we're exporting as doesn't @@ -933,7 +927,7 @@ SKIP: { eval { ($success, $message) = $home->exportAsHtml( { userId => 3, depth => 99 } ) }; is($@, '', "exportAsHtml catches inaccessible exportPath "); is($success, 0, "exportAsHtml returns 0 for inaccessible exportPath"); - is($message, "can't access " . $inaccessibleDirectory->stringify, "exportAsHtml returns correct message for inaccessible exportPath"); + is($message, "can't create exportPath " . $inaccessibleDirectory->stringify, "exportAsHtml returns correct message for inaccessible exportPath"); } # exportPath is a file, not a directory