Line 0
Link Here
|
0 |
- |
1 |
#!/usr/bin/perl |
|
|
2 |
|
3 |
use Modern::Perl; |
4 |
use Test::More tests => 1; |
5 |
|
6 |
use CGI; |
7 |
use C4::Auth_with_cas; |
8 |
|
9 |
my $opac_base_url = C4::Context->preference('OpacBaseURL'); |
10 |
my $query_string = 'ticket=foo&bar=baz'; |
11 |
|
12 |
$ENV{QUERY_STRING} = $query_string; |
13 |
$ENV{SCRIPT_NAME} = '/cgi-bin/koha/opac-user.pl'; |
14 |
|
15 |
my $cgi = new CGI($query_string); |
16 |
$cgi->delete('ticket'); |
17 |
|
18 |
# _url_with_get_params should return the URL without 'ticket' parameter since it |
19 |
# has been deleted. |
20 |
is(C4::Auth_with_cas::_url_with_get_params($cgi), |
21 |
"$opac_base_url/cgi-bin/koha/opac-user.pl?bar=baz"); |