|
Lines 17-22
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
|
|
20 |
$| = 1; |
| 20 |
use Module::Load::Conditional qw/check_install/; |
21 |
use Module::Load::Conditional qw/check_install/; |
| 21 |
use Test::More; |
22 |
use Test::More; |
| 22 |
use Test::MockModule; |
23 |
use Test::MockModule; |
|
Lines 216-222
subtest "checkpw_shib tests" => sub {
Link Here
|
| 216 |
warnings_exist { |
217 |
warnings_exist { |
| 217 |
( $retval, $retcard, $retuserid ) = checkpw_shib( $shib_login ); |
218 |
( $retval, $retcard, $retuserid ) = checkpw_shib( $shib_login ); |
| 218 |
} |
219 |
} |
| 219 |
[ qr/checkpw_shib/, qr/User Shibboleth-authenticated as:/ ], |
220 |
[ qr/checkpw_shib/, qr/koha borrower field to match: userid/, |
|
|
221 |
qr/shibboleth attribute to match: uid/, |
| 222 |
qr/User Shibboleth-authenticated as:/ ], |
| 220 |
"good user with debug enabled"; |
223 |
"good user with debug enabled"; |
| 221 |
is( $retval, "1", "user authenticated" ); |
224 |
is( $retval, "1", "user authenticated" ); |
| 222 |
is( $retcard, "testcardnumber", "expected cardnumber returned" ); |
225 |
is( $retcard, "testcardnumber", "expected cardnumber returned" ); |
|
Lines 229-234
subtest "checkpw_shib tests" => sub {
Link Here
|
| 229 |
} |
232 |
} |
| 230 |
[ |
233 |
[ |
| 231 |
qr/checkpw_shib/, |
234 |
qr/checkpw_shib/, |
|
|
235 |
qr/koha borrower field to match: userid/, |
| 236 |
qr/shibboleth attribute to match: uid/, |
| 232 |
qr/User Shibboleth-authenticated as:/, |
237 |
qr/User Shibboleth-authenticated as:/, |
| 233 |
qr/not a valid Koha user/ |
238 |
qr/not a valid Koha user/ |
| 234 |
], |
239 |
], |
| 235 |
- |
|
|