Lines 32-41
use MARC::Record;
Link Here
|
32 |
use MARC::Field; |
32 |
use MARC::Field; |
33 |
|
33 |
|
34 |
my $dbh = C4::Context->dbh; |
34 |
my $dbh = C4::Context->dbh; |
35 |
my $login = 'koha'; |
35 |
my $login = $ENV{KOHA_USER} || 'koha'; |
36 |
my $password = 'koha'; |
36 |
my $password = $ENV{KOHA_PASS} || 'koha'; |
37 |
my $base_url= 'http://'.C4::Context->preference("staffClientBaseURL")."/cgi-bin/koha/"; |
37 |
my $staff_client_base_url = |
38 |
my $opac_url= C4::Context->preference("OPACBaseURL"); |
38 |
$ENV{KOHA_INTRANET_URL} || C4::Context->preference("staffClientBaseUrl") || q{}; |
|
|
39 |
my $base_url= $staff_client_base_url . "/cgi-bin/koha/"; |
40 |
my $opac_url = $ENV{KOHA_OPAC_URL} || C4::Context->preference("OPACBaseURL") || q{}; |
41 |
|
39 |
|
42 |
|
40 |
our $sample_data = { |
43 |
our $sample_data = { |
41 |
category => { |
44 |
category => { |
Lines 48-55
our $sample_data = {
Link Here
|
48 |
surname => 'test_patron_surname', |
51 |
surname => 'test_patron_surname', |
49 |
cardnumber => '4242424242', |
52 |
cardnumber => '4242424242', |
50 |
userid => 'test_username', |
53 |
userid => 'test_username', |
51 |
password => 'password', |
54 |
password => 'Password123', |
52 |
password2 => 'password' |
55 |
password2 => 'Password123' |
53 |
}, |
56 |
}, |
54 |
}; |
57 |
}; |
55 |
|
58 |
|
Lines 117-123
END {
Link Here
|
117 |
|
120 |
|
118 |
sub auth { |
121 |
sub auth { |
119 |
my ( $driver, $login, $password) = @_; |
122 |
my ( $driver, $login, $password) = @_; |
120 |
fill_form( $driver, { userid => 'koha', password => 'koha' } ); |
123 |
fill_form( $driver, { userid => $login, password => $password } ); |
121 |
my $login_button = $driver->find_element('//input[@id="submit"]'); |
124 |
my $login_button = $driver->find_element('//input[@id="submit"]'); |
122 |
$login_button->submit(); |
125 |
$login_button->submit(); |
123 |
} |
126 |
} |
124 |
- |
|
|