6 use Test::More tests => 7;
7 use Test::WWW::Mechanize;
9 use Data::Dump qw(dump);
11 my $url = $ENV{INTRANET} || 'http://ffzg.koha-dev.rot13.org:8080';
12 my $koha_conf = $ENV{KOHA_CONF} || '/etc/koha/sites/ffzg/koha-conf.xml';
14 my $xml = XMLin( $koha_conf );
15 diag 'Koha config = ',dump $xml->{config};
17 ok( $xml->{config}->{useldapserver}, 'useldapserver' );
20 require 't/config.pl';
21 diag 'test config = ',dump $config;
23 my $mech = Test::WWW::Mechanize->new;
25 $mech->get_ok( $url, "intranet $url" );
27 $mech->submit_form_ok({
29 userid => $xml->{config}->{user},
30 password => $xml->{config}->{pass},
32 }, "login $xml->{config}->{user}");
34 $mech->submit_form_ok({
37 member => $config->{bind_as},
43 $mech->follow_link_ok({ url_regex => qr/moremember/ }, 'details' );
45 my $html = $mech->content();
47 if ( $html =~ m{(/cgi-bin/koha/members/deletemem\.pl\?member=\d+)}s ) {
48 ok( $1, 'found deletemem' );
49 $mech->get_ok( $url . $1 );