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

(-)a/t/db_dependent/Auth_with_cas.t (-3 / +11 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 3;
20
use Test::More tests => 4;
21
use CGI;
21
use CGI;
22
22
23
use C4::Context;
23
use C4::Context;
Lines 39-46 $dbh->{ AutoCommit } = 0; Link Here
39
$dbh->{ RaiseError } = 1;
39
$dbh->{ RaiseError } = 1;
40
40
41
C4::Context->set_preference('OPACBaseURL','localhost');
41
C4::Context->set_preference('OPACBaseURL','localhost');
42
C4::Context->set_preference('staffClientBaseURL','localhost:8080');
42
43
43
my $opac_base_url = C4::Context->preference('OpacBaseURL');
44
my $opac_base_url = C4::Context->preference('OpacBaseURL');
45
my $staff_base_url = C4::Context->preference('staffClientBaseURL');
44
my $query_string = 'ticket=foo&bar=baz';
46
my $query_string = 'ticket=foo&bar=baz';
45
47
46
$ENV{QUERY_STRING} = $query_string;
48
$ENV{QUERY_STRING} = $query_string;
Lines 50-59 my $cgi = new CGI($query_string); Link Here
50
$cgi->delete('ticket');
52
$cgi->delete('ticket');
51
53
52
# _url_with_get_params tests
54
# _url_with_get_params tests
53
is(C4::Auth_with_cas::_url_with_get_params($cgi),
55
is(C4::Auth_with_cas::_url_with_get_params($cgi, 'opac'),
54
    "$opac_base_url/cgi-bin/koha/opac-user.pl?bar=baz",
56
    "$opac_base_url/cgi-bin/koha/opac-user.pl?bar=baz",
55
   "_url_with_get_params should return URL without deleted parameters (Bug 12398)");
57
   "_url_with_get_params should return URL without deleted parameters (Bug 12398)");
56
58
59
# intranet url test
60
is(C4::Auth_with_cas::_url_with_get_params($cgi, 'intranet'),
61
    "$staff_base_url?bar=baz",
62
   "Intranet URL should be returned when using intranet login (Bug 13507)");
63
64
65
57
$dbh->rollback;
66
$dbh->rollback;
58
67
59
1;
68
1;
60
- 

Return to bug 13507