--- /dev/null
+use strict;
+use warnings FATAL => 'all';
+use autodie;
+
+use Test::More;
+
+use Cwd qw(getcwd);
+use File::Temp qw(tempdir);
+
+# Chdir to test directory for laziness
+my $original_dir = getcwd;
+END {
+ chdir $original_dir;
+}
+
+my $temp_dir = tempdir(CLEANUP => 1);
+chdir($temp_dir);
+
+use App::IdiotBox::Importer;
+
+my $method = 'video_files_from_dir';
+
+# No videos
+my $videos = App::IdiotBox::Importer->$method($temp_dir);
+is_deeply($videos, {}, 'No files reported from empty directory');
+
+# Unknown extensions
+open(undef, '>', 'fake.mp3');
+open(undef, '>', 'fake2.aac');
+
+$videos = App::IdiotBox::Importer->$method($temp_dir);
+is_deeply($videos, {}, 'No files reported from empty directory');
+
+# Known file types
+open(undef, '>', 'good.m4v');
+open(undef, '>', 'good2.flv');
+
+my $expect = {
+ 'good' => [ 'm4v' ],
+ 'good2' => [ 'flv' ],
+};
+
+$videos = App::IdiotBox::Importer->$method($temp_dir);
+is_deeply($videos, $expect, 'Known filetypes detected');
+
+# Grouping by file name without extension
+open(undef, '>', 'good.flv');
+
+unshift @{ $expect->{good} }, 'flv';
+
+$videos = App::IdiotBox::Importer->$method($temp_dir);
+is_deeply($videos, $expect, 'Known filetypes detected');
+
+done_testing;