6 use Test::More tests => 6;
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};
18 require 't/config.pl';
19 diag 'test config = ',dump $config;
21 my $mech = Test::WWW::Mechanize->new;
23 $mech->get_ok( $url, 'intranet' );
25 $mech->submit_form_ok({
27 userid => $xml->{config}->{user},
28 password => $xml->{config}->{pass},
30 }, "login $xml->{config}->{user}");
32 $mech->submit_form_ok({
35 member => 'kohatest@ffzg.hr',
41 $mech->follow_link_ok({ url_regex => qr/moremember/ }, 'details' );
43 my $html = $mech->content();
45 if ( $html =~ m{(/cgi-bin/koha/members/deletemem\.pl\?member=\d+)}s ) {
46 ok( $1, 'found deletemem' );
47 $mech->get_ok( $url . $1 );