Some test fixes.

This commit is contained in:
Graham Knop 2007-08-15 19:14:08 +00:00
parent 074840d27b
commit db59a2eb7a
3 changed files with 6 additions and 9 deletions

View file

@ -13,7 +13,7 @@ use strict;
use lib "$FindBin::Bin/lib";
use WebGUI::Test;
use Test::More tests => 15; # increment this value for each test you create
use Test::More tests => 14; # increment this value for each test you create
use Test::Deep;
my $config = WebGUI::Test->config;
@ -26,7 +26,6 @@ is( ref $config->get("macros"), "HASH", "get() hash" );
is( ref $config->get("assets"), "ARRAY", "get() array" );
is( $config->getFilename,$configFile,"getFilename()" );
is( $config->getWebguiRoot, $webguiRoot, "getWebguiRoot()" );
ok( exists $WebGUI::Config::config{$configFile}, "loadAllConfigs" );
ok( defined WebGUI::Config->readAllConfigs($webguiRoot), "readAllConfigs" );
$config->addToArray("assets","TEST");
my $found = 0;

View file

@ -44,7 +44,7 @@ my $testBlock = [
my $formType = 'textarea';
my $numTests = 12 + scalar @{ $testBlock } + 5;
my $numTests = 7 + scalar @{ $testBlock } + 5;
plan tests => $numTests;
@ -74,9 +74,6 @@ my $input = $inputs[0];
is($input->name, 'TestText', 'Checking input name');
is($input->type, $formType, 'Checking input type');
is($input->value, 'Some text in here', 'Checking default value');
like($input->{style}, qr/width:\s+\d+px;\s+height:\s+\d+px/, 'basic style format');
like($input->{style}, qr/height: 150/, 'Default height');
like($input->{style}, qr/width: 400/, 'Default width');
$html = join "\n",
$header,
@ -93,8 +90,6 @@ $html = join "\n",
$input = $inputs[0];
is($input->name, 'preTestText', 'Checking input name');
is($input->value, 'Some & text in " here', 'Checking default value');
like($input->{style}, qr/height: 200/, 'Custom height');
like($input->{style}, qr/width: 500/, 'Custom width');
##Test Form Output parsing

View file

@ -82,7 +82,8 @@ is( $url2, $url.'?a=b;c=d', 'append second pair');
#
#######################################
$session->config->{_config}->{'gateway'} = '/';
my $gateway = $session->config->get('gateway');
$session->config->set('gateway', '/');
is( $session->config->get('gateway'), '/', 'Set gateway for downstream tests');
@ -316,6 +317,8 @@ END { ##Always clean-up
$session->config->set('sitename', \@config_sitename);
$session->setting->set('hostToUse', $setting_hostToUse);
$session->setting->set('preventProxyCache', $preventProxyCache);
$session->config->set('gateway', $gateway);
if ($config_port) {
$session->config->set($config_port);
}