Lines 5-12
use Test::More tests => 1;
Link Here
|
5 |
|
5 |
|
6 |
use CGI; |
6 |
use CGI; |
7 |
use C4::Auth_with_cas; |
7 |
use C4::Auth_with_cas; |
|
|
8 |
use t::lib::Mocks; |
9 |
|
10 |
my $opac_base_url = 'http://opacbaseurl'; |
11 |
t::lib::Mocks::mock_preference('OPACBaseURL', $opac_base_url); |
8 |
|
12 |
|
9 |
my $opac_base_url = C4::Context->preference('OpacBaseURL'); |
|
|
10 |
my $query_string = 'ticket=foo&bar=baz'; |
13 |
my $query_string = 'ticket=foo&bar=baz'; |
11 |
|
14 |
|
12 |
$ENV{QUERY_STRING} = $query_string; |
15 |
$ENV{QUERY_STRING} = $query_string; |
Lines 18-21
$cgi->delete('ticket');
Link Here
|
18 |
# _url_with_get_params should return the URL without 'ticket' parameter since it |
21 |
# _url_with_get_params should return the URL without 'ticket' parameter since it |
19 |
# has been deleted. |
22 |
# has been deleted. |
20 |
is(C4::Auth_with_cas::_url_with_get_params($cgi), |
23 |
is(C4::Auth_with_cas::_url_with_get_params($cgi), |
21 |
"$opac_base_url/cgi-bin/koha/opac-user.pl?bar=baz"); |
24 |
"$opac_base_url/cgi-bin/koha/opac-user.pl?bar=baz", |
|
|
25 |
"_url_with_get_params should return URL without deleted parameters (Bug 12398)"); |
22 |
- |
|
|