Merge branch 'master' of git@github.com:plainblack/webgui

This commit is contained in:
daviddelikat 2009-11-04 09:42:35 -06:00
commit aab3a74026
43 changed files with 2335 additions and 519 deletions

View file

@ -17,7 +17,7 @@ use WebGUI::Session;
use WebGUI::User;
use WebGUI::Asset;
use Test::More tests => 90; # increment this value for each test you create
use Test::More tests => 92; # increment this value for each test you create
use Test::Deep;
# Test the methods in WebGUI::AssetLineage
@ -388,16 +388,19 @@ my $snippet4 = WebGUI::Asset->newByLineage($session, $snippets[4]->get('lineage'
is ($snippet4->getId, $snippets[4]->getId, 'newByLineage returns correct Asset');
$snippet4 = WebGUI::Asset->newByLineage($session, $snippets[4]->get('lineage'));
is ($snippet4->getId, $snippets[4]->getId, 'newByLineage: cached lookup');
is ($snippet4->getId, $snippets[4]->getId, '... cached lookup');
my $cachedLineage = $session->stow->get('assetLineage');
delete $cachedLineage->{$snippet4->get('lineage')}->{id};
my $snippet4 = WebGUI::Asset->newByLineage($session, $snippets[4]->get('lineage'));
is ($snippet4->getId, $snippets[4]->getId, 'newByLineage: failing id cache forces lookup');
is ($snippet4->getId, $snippets[4]->getId, '... failing id cache forces lookup');
delete $cachedLineage->{$snippet4->get('lineage')}->{class};
my $snippet4 = WebGUI::Asset->newByLineage($session, $snippets[4]->get('lineage'));
is ($snippet4->getId, $snippets[4]->getId, 'newByLineage: failing class cache forces lookup');
is ($snippet4->getId, $snippets[4]->getId, '... failing class cache forces lookup');
is(WebGUI::Asset->newByLineage($session, 'notALineage'), undef, '... returns undef');
ok(!exists $session->stow->get('assetLineage')->{assetLineage}, '... no entry for the bad lineage in stow');
####################################################
#

View file

@ -29,7 +29,11 @@ addToCleanup($versionTag);
my $wiki = $node->addChild({className=>'WebGUI::Asset::Wobject::WikiMaster'});
$versionTag->commit;
my $wikipage = $wiki->addChild({className=>'WebGUI::Asset::WikiPage'}, undef, undef, {skipAutoCommitWorkflows => 1});
my $wikipage = $wiki->addChild(
{className=>'WebGUI::Asset::WikiPage'},
undef, undef,
{skipAutoCommitWorkflows => 1, skipNotification => 1}
);
# 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"));

View file

@ -78,7 +78,7 @@ isa_ok($ems, 'WebGUI::Asset::Wobject::EventManagementSystem');
# Test to see if we can set new values
my $newEMSSettings = {
timezone => 'America/New York',
timezone => 'America/New_York',
};
# update the new values for this instance
@ -222,12 +222,14 @@ $templateMock->mock('process', sub { $templateVars = $_[1]; } );
'isPackage' => ignore(),
'usePackedHeadTags' => ignore(),
'encryptPage' => ignore(),
'eventMetaData' => ignore(),
'tagId' => ignore(),
'seatsAvailable' => '5',
'revisedBy' => ignore(),
'isExportable' => ignore(),
'creationDate' => ignore(),
'ticketStart' => '2009-01-01 14:00:00'
'ticketStart' => '2009-01-01 09:00',
'ticketStart_epoch' => '1230818400',
};
my $ticket2 = {
@ -262,11 +264,13 @@ $templateMock->mock('process', sub { $templateVars = $_[1]; } );
'usePackedHeadTags' => ignore(),
'encryptPage' => ignore(),
'tagId' => ignore(),
'eventMetaData' => ignore(),
'seatsAvailable' => '3',
'revisedBy' => ignore(),
'isExportable' => ignore(),
'creationDate' => ignore(),
'ticketStart' => '2009-01-01 14:00:00'
'ticketStart' => '2009-01-01 09:00',
'ticketStart_epoch' => '1230818400',
};
my @ticketArray = ();