Static export for the topic is done.

This commit is contained in:
Colin Kuskie 2009-04-16 17:09:48 +00:00
parent 905537e9e5
commit fbbd63eaa5
2 changed files with 50 additions and 4 deletions

View file

@ -31,7 +31,7 @@ my $session = WebGUI::Test->session;
#----------------------------------------------------------------------------
# Tests
my $tests = 14;
my $tests = 15;
plan tests => 1 + $tests;
#----------------------------------------------------------------------------
@ -84,6 +84,8 @@ $topic->update({
storiesShort => 3,
});
$versionTag->commit;
################################################################
#
# viewTemplateVariables
@ -154,7 +156,7 @@ cmp_deeply(
creationDate => $now,
},
],
'viewTemplateVars has right number and contents in the story_loop in standalone mode'
'viewTemplateVars has right number and contents in the story_loop in standalone mode. Top story not present in story_loop'
);
is($templateVars->{topStoryTitle}, 'bogs', '... topStoryTitle');
@ -212,7 +214,6 @@ cmp_deeply(
'... photo template variables set'
);
$topic->update({
storiesShort => 20,
});
@ -227,6 +228,33 @@ cmp_deeply(
'viewTemplateVariables: is only finding things with its keywords'
);
$topic->{_exportMode} = 1;
$topic->update({
storiesShort => 3,
});
$templateVars = $topic->viewTemplateVariables;
cmp_deeply(
$templateVars->{story_loop},
[
{
title => 'bogs',
url => $storyHandler->{'bogs'}->getUrl,
creationDate => $now,
},
{
title => 'red',
url => $storyHandler->{'red'}->getUrl,
creationDate => $now,
},
{
title => 'brooks',
url => $storyHandler->{'brooks'}->getUrl,
creationDate => $now,
},
],
'... export mode, URLs are the regular story URLs'
);
}
#----------------------------------------------------------------------------