From e10c2a761e6c656aac558d6124e2c7fd03985f36 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 16 Nov 2010 18:07:05 +0000 Subject: [PATCH 1/1] fix test removed File::Slurp because it breaks on wide characters and follow opac-login link instead of localization text --- t/koha/02-create-test-user.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/koha/02-create-test-user.t b/t/koha/02-create-test-user.t index e2cb50c..3b60b96 100755 --- 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 File::Slurp; our $config; require 't/config.pl'; @@ -17,7 +16,8 @@ my $mech = Test::WWW::Mechanize->new; 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"; } @@ -25,7 +25,7 @@ sub save { $mech->get_ok( 'https://localhost', 'opac' ); 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({ -- 2.20.1