Lines 24-30
use Test::MockModule;
Link Here
|
24 |
use Test::Warn; |
24 |
use Test::Warn; |
25 |
use File::Temp qw(tempdir); |
25 |
use File::Temp qw(tempdir); |
26 |
|
26 |
|
27 |
use CGI; |
27 |
use utf8; |
|
|
28 |
use CGI qw(-utf8 ); |
28 |
use C4::Context; |
29 |
use C4::Context; |
29 |
|
30 |
|
30 |
BEGIN { |
31 |
BEGIN { |
Lines 128-134
subtest "shib_ok tests" => sub {
Link Here
|
128 |
subtest "login_shib_url tests" => sub { |
129 |
subtest "login_shib_url tests" => sub { |
129 |
plan tests => 2; |
130 |
plan tests => 2; |
130 |
|
131 |
|
131 |
my $query_string = 'language=en-GB'; |
132 |
my $string = 'language=en-GB¶m="hehâ¤"'; |
|
|
133 |
my $query_string = Encode::encode('UTF-8', $string); |
134 |
my $query_string_uri_escaped = URI::Escape::uri_escape_utf8('?'.$string); |
132 |
|
135 |
|
133 |
local $ENV{REQUEST_METHOD} = 'GET'; |
136 |
local $ENV{REQUEST_METHOD} = 'GET'; |
134 |
local $ENV{QUERY_STRING} = $query_string; |
137 |
local $ENV{QUERY_STRING} = $query_string; |
Lines 138-145
subtest "login_shib_url tests" => sub {
Link Here
|
138 |
login_shib_url($query), |
141 |
login_shib_url($query), |
139 |
'https://testopac.com' |
142 |
'https://testopac.com' |
140 |
. '/Shibboleth.sso/Login?target=' |
143 |
. '/Shibboleth.sso/Login?target=' |
141 |
. 'https://testopac.com/cgi-bin/koha/opac-user.pl' . '%3F' |
144 |
. 'https://testopac.com/cgi-bin/koha/opac-user.pl' |
142 |
. $query_string, |
145 |
. $query_string_uri_escaped, |
143 |
"login shib url" |
146 |
"login shib url" |
144 |
); |
147 |
); |
145 |
|
148 |
|
146 |
- |
|
|