/[virtual-ldap]/t/koha/01-remove-test-user.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /t/koha/01-remove-test-user.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 104 - (show annotations)
Thu Jul 14 18:49:24 2011 UTC (11 years, 6 months ago) by dpavlin
File MIME type: application/x-troff
File size: 1033 byte(s)
read configuration from koha-conf.xml
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use Test::More tests => 6;
7 use Test::WWW::Mechanize;
8 use XML::Simple;
9 use Data::Dump qw(dump);
10
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';
13
14 my $xml = XMLin( $koha_conf );
15 diag 'Koha config = ',dump $xml->{config};
16
17 our $config;
18 require 't/config.pl';
19 diag 'test config = ',dump $config;
20
21 my $mech = Test::WWW::Mechanize->new;
22
23 $mech->get_ok( $url, 'intranet' );
24
25 $mech->submit_form_ok({
26 fields => {
27 userid => $xml->{config}->{user},
28 password => $xml->{config}->{pass},
29 },
30 }, "login $xml->{config}->{user}");
31
32 $mech->submit_form_ok({
33 form_number => 2,
34 fields => {
35 member => 'kohatest@ffzg.hr',
36 },
37 }, 'find patron' );
38
39 #diag $mech->content;
40
41 $mech->follow_link_ok({ url_regex => qr/moremember/ }, 'details' );
42
43 my $html = $mech->content();
44
45 if ( $html =~ m{(/cgi-bin/koha/members/deletemem\.pl\?member=\d+)}s ) {
46 ok( $1, 'found deletemem' );
47 $mech->get_ok( $url . $1 );
48 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26