2019-08-27 10:32:26 +02:00
|
|
|
use Test::More tests => 5;
|
2019-08-27 10:10:11 +02:00
|
|
|
|
|
|
|
use_ok('Lemonldap::NG::Portal::Main');
|
|
|
|
|
2019-08-27 10:32:26 +02:00
|
|
|
my ( $p, $app );
|
|
|
|
my $ini = {
|
|
|
|
configStorage => {
|
|
|
|
type => 'File',
|
|
|
|
dirName => 't',
|
|
|
|
},
|
|
|
|
localSessionStorage => 'Cache::FileCache',
|
|
|
|
localSessionStorageOptions => {
|
|
|
|
namespace => 'lemonldap-ng-session',
|
|
|
|
cache_root => 't/',
|
|
|
|
cache_depth => 0,
|
|
|
|
},
|
|
|
|
logLevel => 'error',
|
|
|
|
cookieName => 'lemonldap',
|
|
|
|
domain => 'example.com',
|
|
|
|
templateDir => 'site/templates',
|
|
|
|
staticPrefix => '/static',
|
|
|
|
loginHistoryEnabled => 1,
|
|
|
|
securedCookie => 0,
|
|
|
|
https => 0,
|
|
|
|
portalDisplayResetPassword => 1,
|
|
|
|
portalStatus => 1,
|
|
|
|
cda => 1,
|
|
|
|
notification => 1,
|
|
|
|
portalCheckLogins => 1,
|
2019-08-31 22:23:47 +02:00
|
|
|
portalDisplayFavApps => 1,
|
2019-08-27 10:32:26 +02:00
|
|
|
stayConnected => 1,
|
|
|
|
bruteForceProtection => 1,
|
|
|
|
grantSessionRules => 1,
|
|
|
|
upgradeSession => 1,
|
|
|
|
autoSigninRules => { a => 1 },
|
|
|
|
checkState => 1,
|
|
|
|
portalForceAuthn => 1,
|
|
|
|
checkUser => 1,
|
|
|
|
impersonationRule => 1,
|
|
|
|
contextSwitchingRule => 1,
|
2019-10-01 19:55:48 +02:00
|
|
|
decryptValueRule => 1,
|
2019-08-27 10:34:40 +02:00
|
|
|
grantSessionRules => { a => 1 },
|
2019-08-27 10:32:26 +02:00
|
|
|
checkStateSecret => 'x',
|
|
|
|
};
|
|
|
|
|
|
|
|
ok( $p = Lemonldap::NG::Portal::Main->new, 'Portal object' );
|
2019-08-31 22:23:47 +02:00
|
|
|
ok( $p->init($ini), 'Init' );
|
|
|
|
ok( $app = $p->run, 'App' );
|
2019-08-27 10:32:26 +02:00
|
|
|
|
2019-08-27 10:10:11 +02:00
|
|
|
eval { Data::Dumper::Dumper( {} ) };
|
2019-08-27 10:35:25 +02:00
|
|
|
ok( $@, "Portal doesn't depend on Data::Dumper" );
|