projects
/
virtual-ldap
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
skip expired users
[virtual-ldap]
/
t
/
koha
/
02-create-test-user.t
diff --git
a/t/koha/02-create-test-user.t
b/t/koha/02-create-test-user.t
index
e2cb50c
..
afcb887
100755
(executable)
--- a/
t/koha/02-create-test-user.t
+++ b/
t/koha/02-create-test-user.t
@@
-5,7
+5,6
@@
use strict;
use Test::More tests => 4;
use Test::WWW::Mechanize;
use Test::More tests => 4;
use Test::WWW::Mechanize;
-use File::Slurp;
our $config;
require 't/config.pl';
our $config;
require 't/config.pl';
@@
-17,15
+16,17
@@
my $mech = Test::WWW::Mechanize->new;
my $save_count = 1;
sub save {
my $path = '/tmp/login-' . $save_count++ . '.html';
my $save_count = 1;
sub save {
my $path = '/tmp/login-' . $save_count++ . '.html';
- write_file $path, @_;
+ open(my $fh, '>', $path);
+ print $fh @_;
warn "# save $path ", -s $path, " bytes\n";
}
warn "# save $path ", -s $path, " bytes\n";
}
-
-$mech->get_ok( 'https://localhost', 'opac' );
+my $opac_url = $ENV{OPAC_URL} || 'http://ffzg.koha-dev.rot13.org';
+
+$mech->get_ok( $opac_url, "opac $opac_url" );
save $mech->content;
save $mech->content;
-$mech->follow_link_ok({
text_regex => qr/Log in to Your Account
/i }, 'login form' );
+$mech->follow_link_ok({
url_regex => qr/opac-user
/i }, 'login form' );
save $mech->content;
$mech->submit_form_ok({
save $mech->content;
$mech->submit_form_ok({