From 1fa03c3ad886c77d9ad9a97f055a2597bfe1734c Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 14 Sep 2010 09:15:32 -0700 Subject: [PATCH] Add an explicit test for getThumbnailUrl and non-image files (like a PDF) --- t/Storage/Image.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/Storage/Image.t b/t/Storage/Image.t index aae27dddd..c1292d8e5 100644 --- a/t/Storage/Image.t +++ b/t/Storage/Image.t @@ -65,7 +65,7 @@ my $extensionTests = [ }, ]; -plan tests => 54 + scalar @{ $extensionTests }; # increment this value for each test you create +plan tests => 55 + scalar @{ $extensionTests }; # increment this value for each test you create my $session = WebGUI::Test->session; @@ -210,6 +210,8 @@ is($WebGUI::Test::logger_error, q/Can't find a thumbnail for a file named 'round is($thumbStore->getThumbnailUrl('square.png'), $thumbStore->getUrl('thumb-square.png'), 'getThumbnailUrl returns the correct url'); +is($thumbStore->getThumbnailUrl('file.pdf'), '', '... return empty string for a file that is not an image'); + #################################################### # # adjustMaxImageSize