X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2Fkoha%2F02-create-test-user.t;h=e2cb50c97e81a4b4e7bd76a5a192d76200c824ed;hb=7a6892167a96b5aad59f0d2663c33906d6d2ee77;hp=62df482e95ed3036c48ebec0dc774556bf89145d;hpb=66576637717e069cd9c4a34e3a0f5148e52a6bbc;p=virtual-ldap diff --git a/t/koha/02-create-test-user.t b/t/koha/02-create-test-user.t index 62df482..e2cb50c 100755 --- a/t/koha/02-create-test-user.t +++ b/t/koha/02-create-test-user.t @@ -3,7 +3,7 @@ use warnings; use strict; -use Test::More tests => 3; +use Test::More tests => 4; use Test::WWW::Mechanize; use File::Slurp; @@ -15,7 +15,11 @@ use WWW::Mechanize; my $mech = Test::WWW::Mechanize->new; my $save_count = 1; -sub save { write_file "/tmp/login-$save_count.html", @_; $save_count++; } +sub save { + my $path = '/tmp/login-' . $save_count++ . '.html'; + write_file $path, @_; + warn "# save $path ", -s $path, " bytes\n"; +} $mech->get_ok( 'https://localhost', 'opac' ); @@ -33,3 +37,4 @@ $mech->submit_form_ok({ }, 'login'); save $mech->content; +$mech->follow_link_ok({ url_regex => qr/logout/ }, 'logout' );