getPathClassDir tests

This commit is contained in:
Colin Kuskie 2009-05-15 09:54:08 -07:00
parent aef2fd3a75
commit 68378665be

View file

@ -32,7 +32,7 @@ my $session = WebGUI::Test->session;
#----------------------------------------------------------------------------
# Tests
my $tests = 31; # Increment this number for each test you create
my $tests = 35; # Increment this number for each test you create
plan tests => 1 + $tests; # 1 for the use_ok
#----------------------------------------------------------------------------
@ -277,6 +277,30 @@ cmp_deeply(
'fetchFile: retrieved a file from the filesystem'
);
###################################################################
#
# getPathClassDir
#
###################################################################
my $dir = $bundle->getPathClassDir();
isa_ok($dir, 'Path::Class::Dir');
my $timestampDir = $dir->dir_list(-1, 1);
cmp_deeply(
[ split /\./, $timestampDir ],
[ 'new-bundle', 0 ],
'... directory has correct name and timestamp'
);
$dir = $bundle->getPathClassDir(997966800);
isa_ok($dir, 'Path::Class::Dir');
$timestampDir = $dir->dir_list(-1, 1);
cmp_deeply(
[ split /\./, $timestampDir ],
[ 'new-bundle', 997966800 ],
'... directory has correct name and timestamp when timestamp is specified'
);
###################################################################
#
# build