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

(-)a/t/Auth_with_shibboleth.t (-9 / +5 lines)
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 => 9;
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 249-258 is( C4::Auth_with_shibboleth::_get_uri(), Link Here
249
249
250
$OPACBaseURL = "http://testopac.com";
250
$OPACBaseURL = "http://testopac.com";
251
my $result;
251
my $result;
252
warnings_are { $result = C4::Auth_with_shibboleth::_get_uri() }
252
warning_like { $result = C4::Auth_with_shibboleth::_get_uri() }
253
             [ { carped =>
253
             [ qr/Shibboleth requires OPACBaseURL to use the https protocol!/ ],
254
                 'Shibboleth requires OPACBaseURL to use the https protocol!' },
255
             ],
256
             "improper protocol - received expected warning";
254
             "improper protocol - received expected warning";
257
is( $result, "https://testopac.com", "https opac uri returned" );
255
is( $result, "https://testopac.com", "https opac uri returned" );
258
256
Lines 261-269 is( C4::Auth_with_shibboleth::_get_uri(), Link Here
261
    "https://testopac.com", "https opac uri returned" );
259
    "https://testopac.com", "https opac uri returned" );
262
260
263
$OPACBaseURL = undef;
261
$OPACBaseURL = undef;
264
warnings_are { $result = C4::Auth_with_shibboleth::_get_uri() }
262
warning_like { $result = C4::Auth_with_shibboleth::_get_uri() }
265
             [ { carped => 'OPACBaseURL not set!' },
263
             [ qr/OPACBaseURL not set!/ ],
266
             ],
267
             "undefined OPACBaseURL - received expected warning";
264
             "undefined OPACBaseURL - received expected warning";
268
is( $result, "https://", "https opac uri returned" );
265
is( $result, "https://", "https opac uri returned" );
269
266
270
- 

Return to bug 14111