use Test::More; use strict; use JSON; use IO::String; require 't/test-lib.pm'; my $maintests = 30; my $res; my $json; my $client = LLNG::Manager::Test->new( { ini => { logLevel => 'error', authentication => 'Demo', userDB => 'Same', useSafeJail => 1, requireToken => 0, findUser => 1, impersonationRule => 1, findUserControl => '^[\w*\s]+$', findUserWildcard => '*', findUserSearchingAttributes => { 'uid##1' => 'Name', 'guy' => 'Kind', 'type#Type#1' => 'mutant; mutant; character', 'cn#Name' => '2_Bad Guy; Not a good person; 1_The Daleks; daleks' }, findUserExcludingAttributes => { type => 'mutant', uid => 'rtyler' }, } } ); use Lemonldap::NG::Portal::Main::Constants 'PE_USERNOTFOUND'; ## Simple access ok( $res = $client->_get( '/', accept => 'text/html' ), 'Get Portal', ); my ( $host, $url, $query ) = expectForm( $res, '#', undef, 'user', 'password', 'spoofId' ); ok( $res->[2]->[0] =~ m%mandatoryField%, 'Mandatory field' ) or explain( $res->[2]->[0], 'Mandatory' ); my @c = ( $res->[2]->[0] =~ m%