6 use Test::More tests => 4;
7 use Test::WWW::Mechanize;
10 require 't/config.pl';
14 my $mech = Test::WWW::Mechanize->new;
18 my $path = '/tmp/login-' . $save_count++ . '.html';
19 open(my $fh, '>', $path);
21 warn "# save $path ", -s $path, " bytes\n";
24 my $opac_url = $ENV{OPAC_URL} || 'http://ffzg.koha-dev.rot13.org';
26 $mech->get_ok( $opac_url, "opac $opac_url" );
29 $mech->follow_link_ok({ url_regex => qr/opac-user/i }, 'login form' );
32 $mech->submit_form_ok({
35 userid => $config->{bind_as},
36 password => $config->{password},
41 $mech->follow_link_ok({ url_regex => qr/logout/ }, 'logout' );