View | Details | Raw Unified | Return to bug 40379
Collapse All | Expand All

(-)a/t/db_dependent/www/auth_values_input_www.t (-7 / +4 lines)
Lines 19-26 use Modern::Perl; Link Here
19
19
20
use utf8;
20
use utf8;
21
use Test::More;    #See plan tests => \d+ below
21
use Test::More;    #See plan tests => \d+ below
22
use Test::NoWarnings;
22
use Test::WWW::Mechanize;
23
use Test::WWW::Mechanize;
23
use XML::Simple;
24
use JSON;
24
use JSON;
25
use File::Basename;
25
use File::Basename;
26
use File::Spec;
26
use File::Spec;
Lines 32-42 use Koha::AuthorisedValueCategories; Link Here
32
32
33
my $testdir = File::Spec->rel2abs( dirname(__FILE__) );
33
my $testdir = File::Spec->rel2abs( dirname(__FILE__) );
34
34
35
my $koha_conf = $ENV{KOHA_CONF};
35
my $user     = $ENV{KOHA_USER} || 'koha';
36
my $xml       = XMLin($koha_conf);
36
my $password = $ENV{KOHA_PASS} || 'koha';
37
38
my $user     = $ENV{KOHA_USER} || $xml->{config}->{user};
39
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
40
my $intranet = $ENV{KOHA_INTRANET_URL};
37
my $intranet = $ENV{KOHA_INTRANET_URL};
41
38
42
eval { use C4::Context; };
39
eval { use C4::Context; };
Lines 45-51 if ($@) { Link Here
45
} elsif ( not defined $intranet ) {
42
} elsif ( not defined $intranet ) {
46
    plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
43
    plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
47
} else {
44
} else {
48
    plan tests => 30;
45
    plan tests => 31;
49
}
46
}
50
47
51
my $dbh = C4::Context->dbh;
48
my $dbh = C4::Context->dbh;
(-)a/t/db_dependent/www/batch.t (-7 / +4 lines)
Lines 20-27 use Modern::Perl; Link Here
20
20
21
use utf8;
21
use utf8;
22
use Test::More;    #See plan tests => \d+ below
22
use Test::More;    #See plan tests => \d+ below
23
use Test::NoWarnings;
23
use Test::WWW::Mechanize;
24
use Test::WWW::Mechanize;
24
use XML::Simple;
25
use JSON;
25
use JSON;
26
use File::Basename;
26
use File::Basename;
27
use File::Spec;
27
use File::Spec;
Lines 31-39 use Koha::BackgroundJobs; Link Here
31
31
32
my $testdir = File::Spec->rel2abs( dirname(__FILE__) );
32
my $testdir = File::Spec->rel2abs( dirname(__FILE__) );
33
33
34
my $koha_conf = $ENV{KOHA_CONF};
35
my $xml       = XMLin($koha_conf);
36
37
use C4::Context;
34
use C4::Context;
38
my $marcflavour = C4::Context->preference('marcflavour') || 'MARC21';
35
my $marcflavour = C4::Context->preference('marcflavour') || 'MARC21';
39
36
Lines 42-49 my $file = Link Here
42
    ? "$testdir/data/unimarcrecord.mrc"
39
    ? "$testdir/data/unimarcrecord.mrc"
43
    : "$testdir/data/marc21record.mrc";
40
    : "$testdir/data/marc21record.mrc";
44
41
45
my $user     = $ENV{KOHA_USER} || $xml->{config}->{user};
42
my $user     = $ENV{KOHA_USER} || 'koha';
46
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
43
my $password = $ENV{KOHA_PASS} || 'koha';
47
my $intranet = $ENV{KOHA_INTRANET_URL};
44
my $intranet = $ENV{KOHA_INTRANET_URL};
48
45
49
if ( not defined $intranet ) {
46
if ( not defined $intranet ) {
Lines 52-58 if ( not defined $intranet ) { Link Here
52
        . "KOHA_CONF set, you must also set KOHA_USER and KOHA_PASS for "
49
        . "KOHA_CONF set, you must also set KOHA_USER and KOHA_PASS for "
53
        . "your username and password";
50
        . "your username and password";
54
} else {
51
} else {
55
    plan tests => 24;
52
    plan tests => 25;
56
}
53
}
57
54
58
$intranet =~ s#/$##;
55
$intranet =~ s#/$##;
(-)a/t/db_dependent/www/history.t (-7 / +4 lines)
Lines 18-34 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use utf8;
20
use utf8;
21
use XML::Simple;
22
use Encode;
21
use Encode;
23
22
24
use Test::More;    #See plan tests => \d+ below
23
use Test::More;    #See plan tests => \d+ below
24
use Test::NoWarnings;
25
use Test::WWW::Mechanize;
25
use Test::WWW::Mechanize;
26
26
27
my $koha_conf = $ENV{KOHA_CONF};
27
my $user     = $ENV{KOHA_USER} || 'koha';
28
my $xml       = XMLin($koha_conf);
28
my $password = $ENV{KOHA_PASS} || 'koha';
29
30
my $user     = $ENV{KOHA_USER} || $xml->{config}->{user};
31
my $password = $ENV{KOHA_PASS} || $xml->{config}->{pass};
32
my $intranet = $ENV{KOHA_INTRANET_URL};
29
my $intranet = $ENV{KOHA_INTRANET_URL};
33
30
34
eval { use C4::Context; };
31
eval { use C4::Context; };
Lines 37-43 if ($@) { Link Here
37
} elsif ( not defined $intranet ) {
34
} elsif ( not defined $intranet ) {
38
    plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
35
    plan skip_all => "Tests skip. You must set env. variable KOHA_INTRANET_URL to do tests\n";
39
} else {
36
} else {
40
    plan tests => 4;
37
    plan tests => 5;
41
}
38
}
42
39
43
$intranet =~ s#/$##;
40
$intranet =~ s#/$##;
(-)a/t/db_dependent/www/search_utf8.t (-5 / +4 lines)
Lines 19-27 use Modern::Perl; Link Here
19
19
20
use utf8;
20
use utf8;
21
use Test::More;    #See plan tests => \d+ below
21
use Test::More;    #See plan tests => \d+ below
22
use Test::NoWarnings;
22
use Test::WWW::Mechanize;
23
use Test::WWW::Mechanize;
23
use Data::Dumper;
24
use Data::Dumper;
24
use XML::Simple;
25
use File::Basename qw(dirname );
25
use File::Basename qw(dirname );
26
use POSIX;
26
use POSIX;
27
use Encode;
27
use Encode;
Lines 64-70 if ( not $intranet ) { Link Here
64
elsif ( not $opac ) {
64
elsif ( not $opac ) {
65
    plan skip_all => "Tests skip. You must set env. variable KOHA_OPAC_URL to do tests\n";
65
    plan skip_all => "Tests skip. You must set env. variable KOHA_OPAC_URL to do tests\n";
66
} else {
66
} else {
67
    plan tests => 80;
67
    plan tests => 81;
68
}
68
}
69
69
70
$intranet =~ s#/$##;
70
$intranet =~ s#/$##;
Lines 94-101 if ( not defined $mock_zebra->{indexer_pid} ) { Link Here
94
our $agent = Test::WWW::Mechanize->new( autocheck => 1 );
94
our $agent = Test::WWW::Mechanize->new( autocheck => 1 );
95
$agent->get_ok( "$intranet/cgi-bin/koha/mainpage.pl", 'connect to intranet' );
95
$agent->get_ok( "$intranet/cgi-bin/koha/mainpage.pl", 'connect to intranet' );
96
$agent->form_name('loginform');
96
$agent->form_name('loginform');
97
$agent->field( 'login_userid',   $ENV{KOHA_PASS} );
97
$agent->field( 'login_userid',   $ENV{KOHA_PASS} || 'koha' );
98
$agent->field( 'login_password', $ENV{KOHA_USER} );
98
$agent->field( 'login_password', $ENV{KOHA_USER} || 'koha' );
99
$agent->field( 'branch',         '' );
99
$agent->field( 'branch',         '' );
100
$agent->click_ok( '', 'login to staff interface' );
100
$agent->click_ok( '', 'login to staff interface' );
101
101
102
- 

Return to bug 40379