Skeleton for PSGI handler tests
This commit is contained in:
parent
c01a84fadd
commit
8aa41789a9
|
@ -46,5 +46,7 @@ t/40-Lemonldap-NG-Handler-Proxy.t
|
|||
t/50-Lemonldap-NG-Handler-SecureToken.t
|
||||
t/51-Lemonldap-NG-Handler-Zimbra.t
|
||||
t/52-Lemonldap-NG-Handler-AuthBasic.t
|
||||
t/60-Lemonldap-NG-Handler-PSGI.t
|
||||
t/99-pod.t
|
||||
t/lmConf-1
|
||||
t/test-psgi-lib.pm
|
||||
|
|
9
lemonldap-ng-handler/t/60-Lemonldap-NG-Handler-PSGI.t
Normal file
9
lemonldap-ng-handler/t/60-Lemonldap-NG-Handler-PSGI.t
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env perl -I pl/lib
|
||||
|
||||
use Test::More;
|
||||
use JSON;
|
||||
use strict;
|
||||
|
||||
require 't/test-psgi-lib.pm';
|
||||
|
||||
done_testing( count() );
|
31
lemonldap-ng-handler/t/test-psgi-lib.pm
Normal file
31
lemonldap-ng-handler/t/test-psgi-lib.pm
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Base library for tests
|
||||
|
||||
use strict;
|
||||
use Data::Dumper;
|
||||
use 5.10.0;
|
||||
use_ok('Lemonldap::NG::Common::PSGI::Cli::Lib');
|
||||
|
||||
our $client;
|
||||
|
||||
ok(
|
||||
$client = Lemonldap::NG::Common::PSGI::Cli::Lib->new(
|
||||
app => sub {
|
||||
return Lemonldap::NG::Handler::PSGI->run(configStorage => { type => 'File', dirName => 't' });
|
||||
}
|
||||
),
|
||||
'Client object'
|
||||
);
|
||||
|
||||
sub client {
|
||||
return $client;
|
||||
}
|
||||
|
||||
our $count = 2;
|
||||
|
||||
sub count {
|
||||
my $c = shift;
|
||||
$count += $c if ($c);
|
||||
return $count;
|
||||
}
|
||||
|
||||
1;
|
Loading…
Reference in New Issue
Block a user