diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-03-11 20:33:20 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-03-11 20:33:20 +0100 |
commit | 4947c1961eefa26e41314c61a74d361c2593996e (patch) | |
tree | 42690ca9726861e333f42d9384cbc8555d681e3e | |
parent | 97ea33ec84ab05d8c2ac1cf669d90f3d81b835f4 (diff) |
App::Dthumb::Data test: Add case for ->list_archived()
-rwxr-xr-x | t/29-app-dthumb-data.t | 7 |
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'); |