When using encrypted logins, do not add the webServerPort from the config file. Fixes bug #12269.

This commit is contained in:
Colin Kuskie 2011-10-05 22:38:09 -07:00
parent e5ef40f0a4
commit 5314530a3c
4 changed files with 21 additions and 8 deletions

View file

@ -38,7 +38,7 @@ $session->{_env}->{_env} = \%newEnvHash;
my $i18n = WebGUI::International->new($session,'Macro_L_loginBox');
plan tests => 30;
plan tests => 31;
my $output = WebGUI::Macro::L_loginBox::process($session,'','',$template->getId);
my %vars = simpleTextParser($output);
@ -155,6 +155,12 @@ $output = WebGUI::Macro::L_loginBox::process($session,'','',$template->getId);
%vars = simpleTextParser($output);
like($vars{'form.header'}, qr{https://}, 'form.header action set to use SSL by encryptLogin');
WebGUI::Test->originalConfig('webServerPort');
$session->config->set('webServerPort', 8081);
$output = WebGUI::Macro::L_loginBox::process($session,'','',$template->getId);
%vars = simpleTextParser($output);
unlike($vars{'form.header'}, qr{:8081}, '... when setting, remove the port');
##Finally, a test that the default Template exists
$output = WebGUI::Macro::L_loginBox::process($session,'','','');