Update test assets for export tests.

This commit is contained in:
Colin Kuskie 2010-05-11 22:07:05 -07:00
parent c2cbec2f18
commit 78426b7147

View file

@ -188,6 +188,10 @@ my $grandChild = $firstChild->addChild({
});
$versionTag->commit;
foreach my $asset ($parent, $firstChild, $grandChild) {
$asset = $asset->cloneFromDb;
}
my $isExportable;
# simple test first. the asset we're checking isn't exportable. should of course return 0.
@ -748,12 +752,12 @@ is($@, '', "exportAsHtml on parent does not throw an error"); ##Note, string com
[ qw/ parent index.html /],
);
my $numberCreatedAll = scalar @createdFiles;
like($message, qr/Exported $numberCreatedAll pages/, "exportAsHtml on parent returns correct message");
# turn them into Path::Class::File objects
@shouldExist = map { Path::Class::File->new($exportPath, @{$_})->absolute->stringify } @createdFiles;
my $numberCreatedAll = scalar @createdFiles;
like($message, qr/Exported $numberCreatedAll pages/, "exportAsHtml on parent returns correct message");
# ensure that the files that should exist do exist
my @doExist;
$exportPath->recurse( callback => sub { my $o = shift; $o->is_dir ? return : push @doExist, $o->absolute->stringify } );