/[virtual-ldap]/t/koha/02-create-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/02-create-test-user.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 101 - (show annotations)
Tue Nov 16 18:07:05 2010 UTC (13 years, 4 months ago) by dpavlin
File MIME type: application/x-troff
File size: 757 byte(s)
fix test

removed File::Slurp because it breaks on wide characters and
follow opac-login link instead of localization text

1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use Test::More tests => 4;
7 use Test::WWW::Mechanize;
8
9 our $config;
10 require 't/config.pl';
11
12 use WWW::Mechanize;
13
14 my $mech = Test::WWW::Mechanize->new;
15
16 my $save_count = 1;
17 sub save {
18 my $path = '/tmp/login-' . $save_count++ . '.html';
19 open(my $fh, '>', $path);
20 print $fh @_;
21 warn "# save $path ", -s $path, " bytes\n";
22 }
23
24
25 $mech->get_ok( 'https://localhost', 'opac' );
26 save $mech->content;
27
28 $mech->follow_link_ok({ url_regex => qr/opac-user/i }, 'login form' );
29 save $mech->content;
30
31 $mech->submit_form_ok({
32 form_number => 2,
33 fields => {
34 userid => $config->{bind_as},
35 password => $config->{password},
36 },
37 }, 'login');
38 save $mech->content;
39
40 $mech->follow_link_ok({ url_regex => qr/logout/ }, 'logout' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26