Remove tests for file content that do not work because files stream.

Update error message in test to match how the code works.
This commit is contained in:
Colin Kuskie 2009-02-03 20:27:36 +00:00
parent cdf2638243
commit a17e4288ba

View file

@ -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