/[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

Annotation of /t/koha/02-create-test-user.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 81 - (hide annotations)
Tue Feb 23 19:40:01 2010 UTC (14 years, 2 months ago) by dpavlin
File MIME type: application/x-troff
File size: 769 byte(s)
dislay path created with html
1 dpavlin 78 #!/usr/bin/perl
2    
3     use warnings;
4     use strict;
5    
6 dpavlin 80 use Test::More tests => 4;
7 dpavlin 78 use Test::WWW::Mechanize;
8     use File::Slurp;
9    
10     our $config;
11     require 't/config.pl';
12    
13     use WWW::Mechanize;
14    
15     my $mech = Test::WWW::Mechanize->new;
16    
17     my $save_count = 1;
18 dpavlin 81 sub save {
19     my $path = '/tmp/login-' . $save_count++ . '.html';
20     write_file $path, @_;
21     warn "# save $path ", -s $path, " bytes\n";
22     }
23 dpavlin 78
24    
25     $mech->get_ok( 'https://localhost', 'opac' );
26     save $mech->content;
27    
28     $mech->follow_link_ok({ text_regex => qr/Log in to Your Account/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 dpavlin 80 $mech->follow_link_ok({ url_regex => qr/logout/ }, 'logout' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26