Clean test (#1440)

This commit is contained in:
Xavier Guimard 2018-06-05 21:13:49 +02:00
parent b321349893
commit 1669a6d482

View File

@ -9,6 +9,7 @@ use Lemonldap::NG::Portal::Main::Constants qw(
require 't/test-lib.pm';
my $res;
my %handlerOR = ( portal => [], app => [] );
my $client = LLNG::Manager::Test->new(
{
@ -20,6 +21,7 @@ my $client = LLNG::Manager::Test->new(
}
}
);
$handlerOR{portal} = \@Lemonldap::NG::Handler::Main::_onReload;
# CDA with unauthentified user
ok(
@ -55,6 +57,7 @@ use_ok('Lemonldap::NG::Common::PSGI::Cli::Lib');
count(2);
my ( $cli, $app );
switch('app');
ok( $app = Lemonldap::NG::Handler::Server->run( $client->ini ), 'App' );
count(1);
@ -117,3 +120,10 @@ expectAuthenticatedAs( $res, 'dwho' );
clean_sessions();
done_testing( count() );
sub switch {
my $type = shift;
@Lemonldap::NG::Handler::Main::_onReload = @{
$handlerOR{$type};
};
}