Skip to content

Commit

Permalink
fix copy tests being hard coded based on default home page content
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Jun 15, 2010
1 parent dc4e481 commit 73319bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions t/AssetHelper/Copy/WithChildren.t
Expand Up @@ -42,8 +42,8 @@ my $root = WebGUI::Asset->getRoot($session);

$session->user({userId => 3});

{

{
my $toBeCopied = $home->getLineage( ['self', 'descendants'] );
$output = WebGUI::AssetHelper::Copy::WithChildren->process($home);
cmp_deeply(
$output,
Expand All @@ -54,7 +54,7 @@ $session->user({userId => 3});
);

my $clippies = $root->getLineage(["descendants"], {statesToInclude => [qw{clipboard clipboard-limbo}], returnObjects => 1,});
is @{ $clippies }, 10, '... only copied the asset to the clipboard with children';
is @{ $clippies }, @$toBeCopied, '... only copied the asset to the clipboard with children';
addToCleanup(@{ $clippies });
}

Expand Down
6 changes: 3 additions & 3 deletions t/AssetHelper/Copy/WithDescendants.t
Expand Up @@ -42,8 +42,8 @@ my $root = WebGUI::Asset->getRoot($session);

$session->user({userId => 3});

{

{
my $toBeCopied = $home->getLineage( ['self', 'descendants'] );
$output = WebGUI::AssetHelper::Copy::WithDescendants->process($home);
cmp_deeply(
$output,
Expand All @@ -54,7 +54,7 @@ $session->user({userId => 3});
);

my $clippies = $root->getLineage(["descendants"], {statesToInclude => [qw{clipboard clipboard-limbo}], returnObjects => 1,});
is @{ $clippies }, 27, '... only copied the asset to the clipboard with children';
is @{ $clippies }, @{ $toBeCopied }, '... only copied the asset to the clipboard with children';
addToCleanup(@{ $clippies });
}

Expand Down

0 comments on commit 73319bf

Please sign in to comment.