projects
/
virtual-ldap
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minimal logging output without DEBUG
[virtual-ldap]
/
t
/
koha
/
01-remove-test-user.t
diff --git
a/t/koha/01-remove-test-user.t
b/t/koha/01-remove-test-user.t
index
3f3a694
..
b3a8806
100755
(executable)
--- a/
t/koha/01-remove-test-user.t
+++ b/
t/koha/01-remove-test-user.t
@@
-3,29
+3,38
@@
use warnings;
use strict;
use warnings;
use strict;
-use Test::More tests =>
6
;
+use Test::More tests =>
7
;
use Test::WWW::Mechanize;
use Test::WWW::Mechanize;
+use XML::Simple;
+use Data::Dump qw(dump);
-
our ( $user, $passwd )
;
-
require 'config.p
l';
+
my $url = $ENV{INTRANET} || 'http://ffzg.koha-dev.rot13.org:8080'
;
+
my $koha_conf = $ENV{KOHA_CONF} || '/etc/koha/sites/ffzg/koha-conf.xm
l';
-my $url = 'https://localhost:8443'; # Koha intranet
+my $xml = XMLin( $koha_conf );
+diag 'Koha config = ',dump $xml->{config};
+
+ok( $xml->{config}->{useldapserver}, 'useldapserver' );
+
+our $config;
+require 't/config.pl';
+diag 'test config = ',dump $config;
my $mech = Test::WWW::Mechanize->new;
my $mech = Test::WWW::Mechanize->new;
-$mech->get_ok( $url,
'intranet'
);
+$mech->get_ok( $url,
"intranet $url"
);
$mech->submit_form_ok({
fields => {
$mech->submit_form_ok({
fields => {
- userid
=> $user
,
- password => $
passwd
,
+ userid
=> $xml->{config}->{user}
,
+ password => $
xml->{config}->{pass}
,
},
},
-},
'login'
);
+},
"login $xml->{config}->{user}"
);
$mech->submit_form_ok({
form_number => 2,
fields => {
$mech->submit_form_ok({
form_number => 2,
fields => {
- member =>
'kohatest@ffzg.hr'
,
+ member =>
$config->{bind_as}
,
},
}, 'find patron' );
},
}, 'find patron' );