/[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 78 - (hide annotations)
Tue Feb 23 18:16:03 2010 UTC (10 years, 8 months ago) by dpavlin
File MIME type: application/x-troff
File size: 646 byte(s)
Koha integration tests - remove and create test user

1 dpavlin 78 #!/usr/bin/perl
2    
3     use warnings;
4     use strict;
5    
6     use Test::More tests => 3;
7     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     sub save { write_file "/tmp/login-$save_count.html", @_; $save_count++; }
19    
20    
21     $mech->get_ok( 'https://localhost', 'opac' );
22     save $mech->content;
23    
24     $mech->follow_link_ok({ text_regex => qr/Log in to Your Account/i }, 'login form' );
25     save $mech->content;
26    
27     $mech->submit_form_ok({
28     form_number => 2,
29     fields => {
30     userid => $config->{bind_as},
31     password => $config->{password},
32     },
33     }, 'login');
34     save $mech->content;
35    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26