Merge remote branch 'upstream/WebGUI8' into 8-merge
Conflicts: docs/gotcha.txt docs/previousVersion.sql lib/WebGUI/Asset/Wobject/GalleryAlbum.pm lib/WebGUI/Asset/Wobject/Navigation.pm lib/WebGUI/AssetLineage.pm lib/WebGUI/Config.pm lib/WebGUI/Form/Template.pm lib/WebGUI/Group.pm lib/WebGUI/VersionTag.pm lib/WebGUI/Workflow/Activity/TrashExpiredEvents.pm t/AdSpace.t t/Asset/AssetExportHtml.t t/Asset/AssetLineage.t t/Asset/Story.t t/Asset/Template/HTMLTemplateExpr.t t/Asset/Wobject/Gallery/00base.t t/Asset/Wobject/GalleryAlbum/00base.t t/Asset/Wobject/GalleryAlbum/ajax.t t/Asset/Wobject/InOutBoard.t t/Asset/Wobject/StoryArchive.t t/Asset/Wobject/Survey/ExpressionEngine.t t/Asset/Wobject/Survey/Reports.t t/AssetAspect/RssFeed.t t/Auth/mech.t t/Group.t t/Mail/Send.t t/Operation/AdSpace.t t/Session/ErrorHandler.t t/Session/Scratch.t t/Session/Url.t t/Shop/Cart.t t/Shop/Pay.t t/Shop/Ship.t t/Shop/ShipDriver.t t/Shop/TaxDriver/Generic.t t/Shop/Vendor.t t/VersionTag.t t/lib/WebGUI/Test.pm
This commit is contained in:
commit
708b47d73c
165 changed files with 3199 additions and 5718 deletions
|
|
@ -290,7 +290,7 @@ is($gcAsPath->absolute($exportPath)->stringify, $litmus->absolute($exportPath)->
|
|||
|
||||
# now let's get tricky and test different file extensions
|
||||
my $storage = WebGUI::Storage->create($session);
|
||||
WebGUI::Test->addToCleanup($storage);
|
||||
WebGUI::Test->addToCleanup('WebGUI::Storage' => $storage->getId);
|
||||
my $filename = 'somePerlFile_pl.txt';
|
||||
$storage->addFileFromScalar($filename, $filename);
|
||||
$session->user({userId=>3});
|
||||
|
|
|
|||
|
|
@ -85,8 +85,15 @@ my $snippet2 = $folder2->addChild( {
|
|||
});
|
||||
|
||||
$versionTag->commit;
|
||||
my @snipIds;
|
||||
my $lineageIds;
|
||||
|
||||
####################################################
|
||||
#
|
||||
# getLineageSql
|
||||
#
|
||||
####################################################
|
||||
|
||||
note "getLineageSql";
|
||||
ok $root->getLineageSql(['ancestors']), 'valid SQL returned in an error condition';
|
||||
|
||||
####################################################
|
||||
#
|
||||
|
|
@ -94,12 +101,8 @@ my $lineageIds;
|
|||
#
|
||||
####################################################
|
||||
|
||||
my $ids = $folder->getLineage(['self']);
|
||||
cmp_deeply(
|
||||
[$folder->getId],
|
||||
$ids,
|
||||
'getLineage: get self'
|
||||
);
|
||||
my @snipIds;
|
||||
my $lineageIds;
|
||||
|
||||
@snipIds = map { $_->getId } @snippets;
|
||||
$lineageIds = $folder->getLineage(['descendants']);
|
||||
|
|
@ -107,7 +110,7 @@ $lineageIds = $folder->getLineage(['descendants']);
|
|||
cmp_deeply($lineageIds, \@snipIds, 'default order returned by getLineage is lineage order');
|
||||
|
||||
@snipIds = map { $_->getId } @snippets;
|
||||
$ids = $folder->getLineage(['descendants']);
|
||||
my $ids = $folder->getLineage(['descendants']);
|
||||
cmp_bag(
|
||||
\@snipIds,
|
||||
$ids,
|
||||
|
|
@ -143,6 +146,13 @@ cmp_bag(
|
|||
'... descendants of topFolder',
|
||||
);
|
||||
|
||||
my $empty = getListFromIterator($root->getLineageIterator(['ancestors']));
|
||||
cmp_bag(
|
||||
$empty,
|
||||
[],
|
||||
'... getting ancestors of root returns empty array'
|
||||
);
|
||||
|
||||
####################################################
|
||||
#
|
||||
# getLineageIterator
|
||||
|
|
@ -194,6 +204,14 @@ cmp_bag(
|
|||
'getLineageIterator: descendants of topFolder',
|
||||
);
|
||||
|
||||
my $empty = getListFromIterator($root->getLineageIterator(['ancestors']));
|
||||
cmp_bag(
|
||||
$empty,
|
||||
[],
|
||||
'... getting ancestors of root returns empty array'
|
||||
);
|
||||
|
||||
|
||||
####################################################
|
||||
#
|
||||
# getFirstChild
|
||||
|
|
|
|||
|
|
@ -129,6 +129,7 @@ sleep 2;
|
|||
my $event6a = $event6->addRevision({ title => 'Event with storage', }, undef, { skipAutoCommitWorkflows => 1, });
|
||||
ok($session->id->valid($event6a->get('storageId')), 'addRevision gives the new revision a valid storageId');
|
||||
isnt($event6a->get('storageId'), $event6->get('storageId'), '... and it is different from the previous revision');
|
||||
|
||||
my $versionTag2 = WebGUI::VersionTag->getWorking($session);
|
||||
WebGUI::Test->addToCleanup($versionTag2);
|
||||
$versionTag2->commit;
|
||||
|
|
|
|||
|
|
@ -57,15 +57,6 @@ my $uncommittedThread = $collab->addChild($props, @addArgs);
|
|||
# Test for a sane object type
|
||||
isa_ok($thread, 'WebGUI::Asset::Post::Thread');
|
||||
|
||||
my $env = $session->env;
|
||||
$env = Test::MockObject::Extends->new($env);
|
||||
|
||||
my %mockEnv = (
|
||||
REMOTE_ADDR => '192.168.0.2',
|
||||
);
|
||||
|
||||
$env->mock('get', sub { return $mockEnv{$_[1]}});
|
||||
|
||||
$session->user({userId => 3});
|
||||
$thread->rate(1);
|
||||
$thread->trash;
|
||||
|
|
|
|||
|
|
@ -66,3 +66,5 @@ $gallery->purge;
|
|||
|
||||
eval { WebGUI::Asset->newById($session, $properties->{assetId}); };
|
||||
ok( Exception::Class->caught(), 'Gallery no longer able to be instanciated after purge');
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
|
|
@ -70,3 +70,5 @@ $album->purge;
|
|||
|
||||
eval { WebGUI::Asset->newById($session, $properties->{assetId}); };
|
||||
ok( Exception::Class->caught(), 'Album no longer able to be instanciated');
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
|
|
@ -255,3 +255,5 @@ sub callAjaxService {
|
|||
# Call ajax service function and decode reply
|
||||
return decode_json( $album->www_ajax() );
|
||||
}
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
|
|
@ -144,11 +144,9 @@ cmp_bag(
|
|||
dateStamp => ignore(),
|
||||
message => 'work time',
|
||||
username => 'red',
|
||||
}),
|
||||
superhashof({ username => 'Admin' }),
|
||||
superhashof({ username => 'boggs' }),
|
||||
superhashof({ username => 'andy' }),
|
||||
superhashof({ username => 'hadley' }),
|
||||
department => 'No Department',
|
||||
},
|
||||
ignore(), ignore(), ignore(), ignore(),
|
||||
],
|
||||
'view: returns one entry for each user, entry is correct for user with status'
|
||||
) or diag(Dumper $templateVars->{rows_loop});
|
||||
|
|
|
|||
|
|
@ -63,12 +63,6 @@ $canPostMaker->prepare({
|
|||
fail => [1, $reader ],
|
||||
});
|
||||
|
||||
my $tests = 51
|
||||
+ $canPostMaker->plan
|
||||
;
|
||||
plan tests => 1
|
||||
+ $tests;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# put your tests here
|
||||
|
||||
|
|
|
|||
|
|
@ -28,11 +28,9 @@ plan tests => $tests + 1;
|
|||
#----------------------------------------------------------------------------
|
||||
# put your tests here
|
||||
|
||||
my $usedOk = use_ok('WebGUI::Asset::Wobject::Survey::ExpressionEngine');
|
||||
|
||||
my $e = "WebGUI::Asset::Wobject::Survey::ExpressionEngine";
|
||||
use_ok($e);
|
||||
|
||||
WebGUI::Test->originalConfig('enableSurveyExpressionEngine');
|
||||
$session->config->set( 'enableSurveyExpressionEngine', 0 );
|
||||
is( $e->run( $session, 'jump { 1 } target' ),
|
||||
undef, "Nothing happens unless we turn on enableSurveyExpressionEngine in config" );
|
||||
|
|
|
|||
|
|
@ -25,10 +25,6 @@ plan tests => 3;
|
|||
# put your tests here
|
||||
|
||||
use_ok('WebGUI::Asset::Wobject::Survey');
|
||||
my ($survey);
|
||||
|
||||
# Returns the contents of the Survey_tempReport table
|
||||
sub getAll { $session->db->buildArrayRefOfHashRefs('select * from Survey_tempReport where assetId = ?', [$survey->getId]) }
|
||||
|
||||
my $user = WebGUI::User->new( $session, 'new' );
|
||||
WebGUI::Test->addToCleanup($user);
|
||||
|
|
@ -39,6 +35,9 @@ $survey = $import_node->addChild( { className => 'WebGUI::Asset::Wobject::Survey
|
|||
WebGUI::Test->addToCleanup($survey);
|
||||
isa_ok($survey, 'WebGUI::Asset::Wobject::Survey');
|
||||
|
||||
# Returns the contents of the Survey_tempReport table
|
||||
sub getAll { $session->db->buildArrayRefOfHashRefs('select * from Survey_tempReport where assetId = ?', [$survey->getId]) }
|
||||
|
||||
my $sJSON = $survey->getSurveyJSON;
|
||||
|
||||
# Load bare-bones survey, containing a single section (S0)
|
||||
|
|
@ -125,5 +124,4 @@ superhashof({
|
|||
value => 20, # e.g. score
|
||||
})]);
|
||||
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue