Commit f4548758 authored by Yadd's avatar Yadd

More tests (#595)

parent 12fbce8a
......@@ -29,7 +29,7 @@
</Files>
# Temporary hook
<Files *.psgi>
<Files *.fcgi>
SetHandler fcgid-script
Options +ExecCGI
</Files>
......
......@@ -19,7 +19,8 @@ localStorageOptions={ \
notification = 0
checkXSS = 0
portalSkin = pastel
portalSkin = bootstrap
templateDir = __pwd__/lemonldap-ng-portal/site/templates
[handler]
......
......@@ -50,20 +50,22 @@ ok( $hdrs{'Lm-Remote-User'} eq 'dwho', 'User is set' )
or explain( \%hdrs, 'Lm-Remote-User => "dwho"' );
count(4);
#ok(
# $res = &client->_get(
# '/',
# query => 'url=aHR0cHM6Ly90LmV4YW1wbGUuY29tLw==',
# cookie => "lemonldap=$id",
# accept => 'text/html'
# ),
# 'Auth request with bad url'
#);
#ok( $res->[0] == 200, 'Get redirection' ) or explain( $res, 200 );
#my %hdrs = @{ $res->[1] };
#ok( $hdrs{'Lm-Remote-User'} eq 'dwho', 'User is set' )
# or explain( \%hdrs, 'Lm-Remote-User => "dwho"' );
#count(3);
ok(
$res = &client->_get(
'/',
query => 'url=aHR0cHM6Ly90LmV4YW1wbGUuY29tLw==',
cookie => "lemonldap=$id",
accept => 'text/html'
),
'Auth request with bad url'
);
ok( $res->[0] == 200, 'HTTP code is 200' ) or explain( $res, 200 );
my %hdrs = @{ $res->[1] };
ok( $hdrs{'Lm-Remote-User'} eq 'dwho', 'User is set' )
or explain( \%hdrs, 'Lm-Remote-User => "dwho"' );
ok( $hdrs{'Content-Type'} eq 'text/html', 'Reponse is HTML' )
or explain( \%hdrs, 'Content-Type => "text/html"' );
count(4);
#print STDERR Dumper($res);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment