Fixed failing calendar test
7.3.3 beta release
This commit is contained in:
parent
675f07e1b4
commit
1a95b94598
3 changed files with 13 additions and 3 deletions
File diff suppressed because one or more lines are too long
|
|
@ -27,8 +27,12 @@ my $versionTag = WebGUI::VersionTag->getWorking($session);
|
|||
$versionTag->set({name=>"Wiki Test"});
|
||||
|
||||
my $wiki = $node->addChild({className=>'WebGUI::Asset::Wobject::WikiMaster'});
|
||||
$versionTag->commit;
|
||||
my $wikipage = $wiki->addChild({className=>'WebGUI::Asset::WikiPage'});
|
||||
|
||||
# Wikis create and autocommit a version tag when a child is added. Lets get the name so we can roll it back.
|
||||
my $secondVersionTag = WebGUI::VersionTag->new($session,$wikipage->get("tagId"));
|
||||
|
||||
# Test for sane object types
|
||||
isa_ok($wiki, 'WebGUI::Asset::Wobject::WikiMaster');
|
||||
isa_ok($wikipage, 'WebGUI::Asset::WikiPage');
|
||||
|
|
@ -41,5 +45,6 @@ TODO: {
|
|||
END {
|
||||
# Clean up after thy self
|
||||
$versionTag->rollback($versionTag->getId);
|
||||
$secondVersionTag->rollback($secondVersionTag->getId);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ my $node = WebGUI::Asset->getImportNode($session);
|
|||
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Calendar Test"});
|
||||
|
||||
my $cal = $node->addChild({className=>'WebGUI::Asset::Wobject::Calendar'});
|
||||
$versionTag->commit();
|
||||
|
||||
|
|
@ -37,6 +38,9 @@ isa_ok($cal, 'WebGUI::Asset::Wobject::Calendar');
|
|||
my $event = $cal->addChild({className=>'WebGUI::Asset::Event'});
|
||||
isa_ok($event, 'WebGUI::Asset::Event','Can add Events as a child to the calendar.');
|
||||
|
||||
# Calendars create and autocommit a version tag when a child is added. Lets get the name so we can roll it back.
|
||||
my $secondVersionTag = WebGUI::VersionTag->new($session, $event->get("tagId"));
|
||||
|
||||
my $article = $cal->addChild({className=>"WebGUI::Asset::Wobject::Article"});
|
||||
isnt(ref $article, 'WebGUI::Asset::Wobject::Article', "Can't add an article as a child to the calendar.");
|
||||
|
||||
|
|
@ -49,6 +53,7 @@ TODO: {
|
|||
|
||||
END {
|
||||
# Clean up after thy self
|
||||
$versionTag->rollback($versionTag->getId);
|
||||
$versionTag->rollback();
|
||||
$secondVersionTag->rollback();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue