summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-03-11 20:33:20 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-03-11 20:33:20 +0100
commit4947c1961eefa26e41314c61a74d361c2593996e (patch)
tree42690ca9726861e333f42d9384cbc8555d681e3e
parent97ea33ec84ab05d8c2ac1cf669d90f3d81b835f4 (diff)
App::Dthumb::Data test: Add case for ->list_archived()
-rwxr-xr-xt/29-app-dthumb-data.t7
1 files changed, 6 insertions, 1 deletions
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');