Commit 1669a6d4 authored by Xavier Guimard's avatar Xavier Guimard

Clean test (#1440)

parent b3213498
......@@ -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};
};
}
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