From 86d92d68a857e39fb81d36f718b1cf642e9e1eff Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 23 Jul 2007 18:14:40 +0000 Subject: [PATCH] add deleteFile tests to Image.t --- t/Storage/Image.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/Storage/Image.t b/t/Storage/Image.t index d3a9961f7..8be69f5bc 100644 --- a/t/Storage/Image.t +++ b/t/Storage/Image.t @@ -173,19 +173,19 @@ ok(-e $imageCopy->getPath('thumb-square.png'), 'copy also copied the thumbnail') # #################################################### -$imageCopy->deleteFile('square.png'); +is($imageCopy->deleteFile('square.png'), 1, 'deleteFile only reports 1 file deleted'); cmp_bag( - $imageCopy->getFiles(), #Must call SUPER because getFiles ignores thumb files. + $imageCopy->getFiles(), [qw()], 'delete deleted the file', ); ok(!-e $imageCopy->getPath('thumb-square.png'), 'deleteFile also deleted the thumbnail'); +is($imageCopy->deleteFile('../../'), undef, 'deleteFile in Storage::Image also returns undef if you try to delete a file outside of this storage object'); + TODO: { local $TODO = "Methods that need to be tested"; - ok(0, 'copy also copies thumbnails'); - ok(0, 'deleteFile also deletes thumbnails'); ok(0, 'getThumbnailUrl'); ok(0, 'resize'); }