Fix gateway url handling in the RenderThingData macro. Fixes one part of #12133.

This commit is contained in:
Colin Kuskie 2011-05-31 21:27:53 -07:00
parent b866601efa
commit 197f94c0e5
3 changed files with 25 additions and 9 deletions

View file

@ -39,7 +39,7 @@ WebGUI::Test->addToCleanup(sub {
WebGUI::Test->unmockAssetUrl($templateUrl);
});
plan tests => 4;
plan tests => 6;
my $node = WebGUI::Asset->getImportNode($session);
my $versionTag = WebGUI::VersionTag->getWorking($session);
@ -105,5 +105,17 @@ $templateProcessed = 0;
$output = WebGUI::Macro::RenderThingData::process($session, $thing_url, $templateUrl);
ok $templateProcessed, 'passed template url, template processed';
$templateProcessed = 0;
WebGUI::Test->originalConfig('gateway');
$session->config->set('gateway', '/gated');
my $thing_url = $thingy->getUrl('thingId='.$thingId.';thingDataId='.$thingDataId);
$output = WebGUI::Macro::RenderThingData::process($session, $thing_url, $templateId);
ok $templateProcessed, 'gateway set, passed templateId, template processed';
$templateProcessed = 0;
$output = WebGUI::Macro::RenderThingData::process($session, $thing_url, $templateUrl);
ok $templateProcessed, '... passed template url, template processed';
$templateProcessed = 0;