Improve unit tests (#2185)
This commit is contained in:
parent
5d34e1566c
commit
067d6ca6c4
|
@ -3,7 +3,7 @@ use strict;
|
|||
use IO::String;
|
||||
|
||||
require 't/test-lib.pm';
|
||||
my $maintests = 20;
|
||||
my $maintests = 22;
|
||||
|
||||
SKIP: {
|
||||
eval { require Convert::Base32 };
|
||||
|
@ -18,6 +18,7 @@ SKIP: {
|
|||
totp2fSelfRegistration => 1,
|
||||
totp2fActivation => 1,
|
||||
totp2fTTL => 120,
|
||||
sfManagerRule => 0,
|
||||
totp2fIssuer => 'LLNG_Demo',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
|
@ -37,6 +38,18 @@ SKIP: {
|
|||
);
|
||||
my $id = expectCookie($res);
|
||||
|
||||
ok(
|
||||
$res = $client->_get(
|
||||
'/',
|
||||
cookie => "lemonldap=$id",
|
||||
accept => 'text/html'
|
||||
),
|
||||
'Get Menu'
|
||||
);
|
||||
ok( $res->[2]->[0] !~ m%<span trspan="sfaManager">sfaManager</span>%,
|
||||
'sfaManager link found' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
|
||||
# TOTP form
|
||||
ok(
|
||||
$res = $client->_get(
|
||||
|
|
|
@ -3,7 +3,7 @@ use strict;
|
|||
use IO::String;
|
||||
|
||||
require 't/test-lib.pm';
|
||||
my $maintests = 18;
|
||||
my $maintests = 20;
|
||||
|
||||
SKIP: {
|
||||
eval { require Crypt::U2F::Server; require Authen::U2F::Tester };
|
||||
|
@ -17,8 +17,9 @@ SKIP: {
|
|||
logLevel => 'error',
|
||||
u2fSelfRegistration => 1,
|
||||
u2fActivation => 1,
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
totp2fTTL => 2,
|
||||
sfManagerRule => '$uid eq "davros"',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -36,6 +37,18 @@ SKIP: {
|
|||
);
|
||||
my $id = expectCookie($res);
|
||||
|
||||
ok(
|
||||
$res = $client->_get(
|
||||
'/',
|
||||
cookie => "lemonldap=$id",
|
||||
accept => 'text/html'
|
||||
),
|
||||
'Get Menu'
|
||||
);
|
||||
ok( $res->[2]->[0] !~ m%<span trspan="sfaManager">sfaManager</span>%,
|
||||
'sfaManager link found' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
|
||||
# U2F form
|
||||
ok(
|
||||
$res = $client->_get(
|
||||
|
|
|
@ -4,7 +4,7 @@ use IO::String;
|
|||
use Data::Dumper;
|
||||
|
||||
require 't/test-lib.pm';
|
||||
my $maintests = 54;
|
||||
my $maintests = 56;
|
||||
|
||||
SKIP: {
|
||||
eval { require Convert::Base32 };
|
||||
|
@ -26,6 +26,7 @@ SKIP: {
|
|||
totp2fActivation => 1,
|
||||
u2fSelfRegistration => 1,
|
||||
u2fActivation => 1,
|
||||
sfManagerRule => '$uid eq "dwho"',
|
||||
portalMainLogo => 'common/logos/logo_llng_old.png',
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +45,18 @@ SKIP: {
|
|||
);
|
||||
my $id = expectCookie($res);
|
||||
|
||||
ok(
|
||||
$res = $client->_get(
|
||||
'/',
|
||||
cookie => "lemonldap=$id",
|
||||
accept => 'text/html'
|
||||
),
|
||||
'Get Menu'
|
||||
);
|
||||
ok( $res->[2]->[0] =~ m%<span trspan="sfaManager">sfaManager</span>%,
|
||||
'sfaManager link found' )
|
||||
or print STDERR Dumper( $res->[2]->[0] );
|
||||
|
||||
# TOTP form
|
||||
ok(
|
||||
$res = $client->_get(
|
||||
|
|
Loading…
Reference in New Issue
Block a user