Use old path for now (#595)

This commit is contained in:
Xavier Guimard 2016-04-08 04:40:41 +00:00
parent 72a076d980
commit ef25e1f2ca
2 changed files with 11 additions and 2 deletions

View File

@ -8,15 +8,20 @@ my $res;
init( { logLevel => 'debug', useSafeJail => 1 } );
# Test normal first access
# ------------------------
ok( $res = &client->_get('/'), 'Unauth JSON request' );
ok( $res->[0] == 401, 'Response is 401' ) or explain( $res, 401 );
count(2);
# Test "first access" with good url
ok( $res = &client->_get('/?url=aHR0cDovL3Rlc3QxLmV4YW1wbGUuY29tLw=='),
'Unauth ajax request with good url' );
ok( $res->[0] == 401, 'Response is 401' ) or explain( $res, 401 );
count(2);
# Try yo authenticate
# -------------------
ok(
$res = &client->_post(
'/', '',
@ -25,12 +30,13 @@ ok(
),
'Auth query'
);
my $cookies = getCookies($res);
my $id;
ok( $id = $cookies->{lemonldap}, 'Get cookie' );
count(2);
# Try to get a redirection for an auth user with a valid url
# ----------------------------------------------------------
ok(
$res = &client->_get(
'/',
@ -50,6 +56,9 @@ ok( $hdrs{'Lm-Remote-User'} eq 'dwho', 'User is set' )
or explain( \%hdrs, 'Lm-Remote-User => "dwho"' );
count(4);
# Try to get a redirection for an auth user with a bad url (host undeclared
# in manager)
# -------------------------------------------------------------------------
ok(
$res = &client->_get(
'/',

View File

@ -19,7 +19,7 @@ sub init {
$ini->{configStorage} ||= { type => 'File', dirName => 't' };
$ini->{logLevel} ||= 'error';
$ini->{cookieName} ||= 'lemonldap';
$ini->{templateDir} ||= 'site/templates';
$ini->{templateDir} ||= 'example/skins';
$ini->{staticPrefix} ||= '/index.fcgi';
$ini->{securedCookie} //= 0;
$ini->{https} //= 0;