From 4947c1961eefa26e41314c61a74d361c2593996e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 11 Mar 2011 20:33:20 +0100 Subject: App::Dthumb::Data test: Add case for ->list_archived() --- t/29-app-dthumb-data.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/29-app-dthumb-data.t b/t/29-app-dthumb-data.t index 7ca9f2d..3790006 100755 --- a/t/29-app-dthumb-data.t +++ b/t/29-app-dthumb-data.t @@ -11,8 +11,10 @@ opendir(my $share, 'share'); my @files = grep { /^[^.]/ } readdir($share); closedir($share); +my @files_archived = sort grep { ! /\.dthumb$/ } @files; + plan( - tests => 2 + scalar @files, + tests => 3 + scalar @files, ); my $dthumb = App::Dthumb::Data->new(); @@ -28,3 +30,6 @@ for my $file (@files) { } is($dthumb->get('404notfound'), undef, '$dthumb->get on non-existing file'); + +is_deeply([@files_archived], [sort $dthumb->list_archived()], + '$dthumb->list_archived skips .dthumb files'); -- cgit v1.2.3