From 4d98283489ab2c602d370b57e755e8dea8e16e3c Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 18 Nov 2005 21:58:11 +0000 Subject: [PATCH] remove unused module from help tests, add more templates to check, make help_related output more verbose to make debugging easier --- t/help_compiled.t | 1 - t/help_related.t | 9 ++++++--- t/mandatory_template_vars.t | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/t/help_compiled.t b/t/help_compiled.t index 1ee6af78c..c37b44034 100644 --- a/t/help_compiled.t +++ b/t/help_compiled.t @@ -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 diff --git a/t/help_related.t b/t/help_related.t index 7ccf83229..09fe69f86 100644 --- a/t/help_related.t +++ b/t/help_related.t @@ -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 diff --git a/t/mandatory_template_vars.t b/t/mandatory_template_vars.t index d9e85bcfa..6d332dc9f 100644 --- a/t/mandatory_template_vars.t +++ b/t/mandatory_template_vars.t @@ -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 => [ ], + }, );