From 78426b7147182fb3b0133b52db27a8d55c4aa0ad Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 11 May 2010 22:07:05 -0700 Subject: [PATCH] Update test assets for export tests. --- t/Asset/AssetExportHtml.t | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/t/Asset/AssetExportHtml.t b/t/Asset/AssetExportHtml.t index 6445786fb..7d6acfdc3 100644 --- a/t/Asset/AssetExportHtml.t +++ b/t/Asset/AssetExportHtml.t @@ -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 } );