From 61399a5a5ef6752fbcc93d672deb624de4444886 Mon Sep 17 00:00:00 2001 From: Christophe Maudoux Date: Fri, 23 Nov 2018 23:04:47 +0100 Subject: [PATCH] Improve unit test (#1550) --- lemonldap-ng-portal/t/28-AuthChoice-with-rules.t | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lemonldap-ng-portal/t/28-AuthChoice-with-rules.t b/lemonldap-ng-portal/t/28-AuthChoice-with-rules.t index 437bb8db3..741102689 100644 --- a/lemonldap-ng-portal/t/28-AuthChoice-with-rules.t +++ b/lemonldap-ng-portal/t/28-AuthChoice-with-rules.t @@ -5,7 +5,7 @@ use IO::String; require 't/test-lib.pm'; my $res; -my $maintests = 9; +my $maintests = 12; eval { unlink 't/userdb.db' }; @@ -36,6 +36,7 @@ SKIP: { '4_demo' => 'Demo;Demo;Null;https://test.example.com;$env->{ipAddr} =~ /1.2.3.4/', '5_ssl' => 'SSL;LDAP;LDAP', + '6_FakeCustom' => 'Custom;Demo;Demo', }, dbiAuthChain => 'dbi:SQLite:dbname=t/userdb.db', @@ -45,6 +46,8 @@ SKIP: { dbiAuthLoginCol => 'user', dbiAuthPasswordCol => 'password', dbiAuthPasswordHash => '', + customAuth => '::Auth::Apache', + customAddParams => {}, } } ); @@ -53,6 +56,13 @@ SKIP: { ok( $res->[2]->[0] !~ /1_demo/, '1_demo not displayed' ); ok( $res->[2]->[0] =~ /3_demo/, '3_demo displayed' ); ok( $res->[2]->[0] =~ /5_ssl/, '5_ssl displayed' ); + ok( $res->[2]->[0] =~ /6_FakeCustom/, '6_FakeCustom displayed' ); + ok( $res->[2]->[0] =~ qr%img src="/static/common/modules/Apache.png"%, + 'Found 6_FakeCustom Logo' ) + or print STDERR Dumper( $res->[2]->[0] ); + ok( $res->[2]->[0] =~ qr%[2]->[0] ); ok( $res->[2]->[0] =~ m%
[2]->[0] ); -- 2.22.0