Merge commit 'v7.10.19' into WebGUI8
This commit is contained in:
commit
4fea10a1f5
52 changed files with 490 additions and 77 deletions
|
|
@ -32,7 +32,7 @@ my $session = WebGUI::Test->session;
|
|||
$templateMock->mock_id( $templateId );
|
||||
$templateMock->mock_url( $templateUrl );
|
||||
|
||||
plan tests => 6;
|
||||
plan tests => 7;
|
||||
|
||||
my $node = WebGUI::Test->asset;
|
||||
my $thingy = $node->addChild({
|
||||
|
|
@ -107,3 +107,6 @@ $output = WebGUI::Macro::RenderThingData::process($session, $thing_url, $templat
|
|||
ok $templateProcessed, '... passed template url, template processed';
|
||||
$templateProcessed = 0;
|
||||
|
||||
$output = WebGUI::Macro::RenderThingData::process($session, $thing_url, $templateUrl, "fakeAssetId");
|
||||
ok $templateVars->{'callerAssetId'} eq 'fakeAssetId', '... passed callerAssetId, template var was passed';
|
||||
$templateProcessed = 0;
|
||||
|
|
|
|||
|
|
@ -13,17 +13,16 @@ use strict;
|
|||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Workflow::Activity::CalendarUpdateFeeds;
|
||||
use WebGUI::Asset::Wobject::Calendar;
|
||||
|
||||
use Test::More;
|
||||
use Test::Deep;
|
||||
use Test::LongString;
|
||||
use Data::Dumper;
|
||||
use WebGUI::Asset::Wobject::Calendar;
|
||||
|
||||
plan skip_all => 'set WEBGUI_LIVE to enable this test'
|
||||
unless $ENV{WEBGUI_LIVE};
|
||||
|
||||
plan tests => 23; # increment this value for each test you create
|
||||
plan tests => 27; # increment this value for each test you create
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
|
|
@ -173,7 +172,7 @@ SKIP: {
|
|||
##Add an ical feed to check time zone processing
|
||||
|
||||
$receiver->deleteFeed($feedId);
|
||||
$receiver->addFeed({
|
||||
$feedId = $receiver->addFeed({
|
||||
url => $session->url->getSiteURL.$snippet_feed->getUrl,
|
||||
lastUpdated => 'never',
|
||||
});
|
||||
|
|
@ -201,4 +200,36 @@ $newEvents = $receiver->getLineage(['children'], { returnObjects => 1, });
|
|||
|
||||
my $got_cpr = is(scalar @{ $newEvents }, 1, 'ical import of 1 event');
|
||||
|
||||
##Add a feed that will fail, to test that feeds are not modified
|
||||
$receiver->deleteFeed($feedId);
|
||||
my $feedUrl = $session->url->getSiteURL.'do_not_hack_my_url';
|
||||
$feedId = $receiver->addFeed({
|
||||
url => $feedUrl,
|
||||
lastUpdated => 'never',
|
||||
});
|
||||
|
||||
$instance1->delete('skipNotify');
|
||||
$instance1 = WebGUI::Workflow::Instance->create($session,
|
||||
{
|
||||
workflowId => $workflow->getId,
|
||||
skipSpectreNotification => 1,
|
||||
}
|
||||
);
|
||||
|
||||
my $retVal;
|
||||
|
||||
$retVal = $instance1->run();
|
||||
is($retVal, 'complete', 'cleanup: activity complete');
|
||||
$retVal = $instance1->run();
|
||||
is($retVal, 'done', 'cleanup: activity is done');
|
||||
$instance1->delete;
|
||||
|
||||
$receiver = $receiver->cloneFromDb;
|
||||
my $feed = $receiver->getFeed($feedId);
|
||||
|
||||
##Note, cannot use Test::Deep in here because Asset/Event.pm use Test::Deep::NoTest
|
||||
|
||||
is $feed->{lastResult}, 'Error parsing iCal feed', 'After fetching a bad feed it updated the lastResult';
|
||||
is $feed->{url}, $feedUrl, '... nothing added to feed URL';
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue