Lines 28-34
use C4::Context;
Link Here
|
28 |
|
28 |
|
29 |
BEGIN { |
29 |
BEGIN { |
30 |
if ( check_install( module => 'Test::DBIx::Class' ) ) { |
30 |
if ( check_install( module => 'Test::DBIx::Class' ) ) { |
31 |
plan tests => 6; |
31 |
plan tests => 11; |
32 |
} else { |
32 |
} else { |
33 |
plan skip_all => "Need Test::DBIx::Class" |
33 |
plan skip_all => "Need Test::DBIx::Class" |
34 |
} |
34 |
} |
Lines 245-249
subtest "checkpw_shib tests" => sub {
Link Here
|
245 |
is( C4::Auth_with_shibboleth::_get_uri(), |
245 |
is( C4::Auth_with_shibboleth::_get_uri(), |
246 |
"https://testopac.com", "https opac uri returned" ); |
246 |
"https://testopac.com", "https opac uri returned" ); |
247 |
|
247 |
|
|
|
248 |
$OPACBaseURL = "http://testopac.com"; |
249 |
my $result; |
250 |
warning_like { $result = C4::Auth_with_shibboleth::_get_uri() } |
251 |
[ qr/Shibboleth requires OPACBaseURL to use the https protocol!/ ], |
252 |
"improper protocol - received expected warning"; |
253 |
is( $result, "https://testopac.com", "https opac uri returned" ); |
254 |
|
255 |
$OPACBaseURL = "https://testopac.com"; |
256 |
is( C4::Auth_with_shibboleth::_get_uri(), |
257 |
"https://testopac.com", "https opac uri returned" ); |
258 |
|
259 |
$OPACBaseURL = undef; |
260 |
warning_like { $result = C4::Auth_with_shibboleth::_get_uri() } |
261 |
[ qr/OPACBaseURL not set!/ ], |
262 |
"undefined OPACBaseURL - received expected warning"; |
263 |
is( $result, "https://", "https opac uri returned" ); |
264 |
|
248 |
## _get_shib_config |
265 |
## _get_shib_config |
249 |
# Internal helper function, covered in tests above |
266 |
# Internal helper function, covered in tests above |
250 |
- |
|
|