remove unused module from help tests, add more templates to check, make help_related output more verbose to make debugging easier

This commit is contained in:
Colin Kuskie 2005-11-18 21:58:11 +00:00
parent 9a368956e7
commit 4d98283489
3 changed files with 27 additions and 4 deletions

View file

@ -14,7 +14,6 @@ use lib '../lib';
use Getopt::Long;
use WebGUI::Session;
use WebGUI::Operation::Help;
use File::Find;
# ---- END DO NOT EDIT ----
#The goal of this test is to verify that all entries in the lib/WebGUI/Help

View file

@ -14,7 +14,6 @@ use lib '../lib';
use Getopt::Long;
use WebGUI::Session;
use WebGUI::Operation::Help;
use File::Find;
# ---- END DO NOT EDIT ----
#The goal of this test is to verify that all entries in the lib/WebGUI/Help
@ -43,6 +42,10 @@ my @relatedHelp = ();
foreach my $topic ( keys %helpTable ) {
foreach my $entry ( keys %{ $helpTable{$topic} }) {
my @related = @{ $helpTable{$topic}{$entry}{related} };
foreach my $relHash (@related) {
$relHash->{parentEntry} = $entry;
$relHash->{parentTopic} = $topic;
}
push @relatedHelp, @related;
$numTests += scalar @related;
}
@ -55,8 +58,8 @@ plan tests => $numTests;
##Each array element is a hash with two keys, tag (entry) and namespace (topic).
foreach my $related (@relatedHelp) {
my ($topic, $entry) = @{ $related }{'namespace', 'tag'};
ok( exists $helpTable{$topic}{$entry}, "Help entry: $topic -> $entry");
my ($topic, $entry, $parentTopic, $parentEntry) = @{ $related }{'namespace', 'tag', 'parentTopic', 'parentEntry'};
ok( exists $helpTable{$topic}{$entry}, "Help entry: $topic -> $entry from $parentTopic -> $parentEntry");
}
# put your tests here

View file

@ -53,6 +53,27 @@ my @tmplVarTable = (
id => 'PBtmplHelp000000000001',
vars => [ qw(body fields) ],
},
## Login, account and password templates
{
id => 'PBtmpl0000000000000010',
vars => [ ],
},
{
id => 'PBtmpl0000000000000011',
vars => [ ],
},
{
id => 'PBtmpl0000000000000012',
vars => [ ],
},
{
id => 'PBtmpl0000000000000013',
vars => [ ],
},
{
id => 'PBtmpl0000000000000014',
vars => [ ],
},
);