Make version tags mandatory again.

This commit is contained in:
Colin Kuskie 2011-10-25 19:44:58 -07:00
parent d0b3be1749
commit 4bfabb9469
94 changed files with 405 additions and 489 deletions

View file

@ -28,13 +28,11 @@ $versionTag->set({name=>"Collab setup"});
WebGUI::Test->addToCleanup($versionTag);
# Need to create a Collaboration system in which the post lives.
my @addArgs = ( undef, undef, { skipNotification => 1 } );
my @addArgs = ( undef, undef, { skipNotification => 1, skipAutoCommitWorkflows => 1 } );
my $collab = $node->addChild({
className => 'WebGUI::Asset::Wobject::Collaboration',
editTimeout => '1',
threadsPerPage => 3,
status => "pending",
tagId => $versionTag->getId,
},
@addArgs);
@ -44,8 +42,6 @@ my $props = {
className => 'WebGUI::Asset::Post::Thread',
content => 'hello, world!',
ownerUserId => 1,
status => "pending",
tagId => $versionTag->getId,
};
my $thread = $collab->addChild($props, @addArgs);
@ -79,13 +75,16 @@ my @newThreads;
my $threadCount = 15;
my $versionTag2 = WebGUI::VersionTag->getWorking($session);
WebGUI::Test->addToCleanup( $versionTag2 );
$props->{tagId} = $versionTag2->getId;
while ($threadCount--) {
push @newThreads, $collab->addChild($props, @addArgs);
}
$_->setSkipNotification for @newThreads;
$versionTag2->commit;
foreach my $asset (@newThreads) {
$asset = $asset->cloneFromDb;
}
my $csUrl = $collab->get('url');
like $newThreads[-1]->getCSLinkUrl, qr/^$csUrl/, 'getCsLinkUrl returns URL of the parent CS with no gateway';
like $newThreads[-1]->getCSLinkUrl, qr/\?pn=1/, '... and has the right page number';